What are Template Literals in JavaScript and how do they enhance code readability?
Instruction: Define Template Literals and provide examples of their usage.
Context: This question is aimed at understanding the candidate's knowledge of ES6 features, specifically Template Literals, and how they contribute to cleaner and more readable code.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Template literals use backticks and support interpolation with ${expression} and literal newlines. They make strings containing several values easier to read than long chains of concatenation.
const name = "Ava"; const count = 3; const greeting = `Hello, ${name}...