Sparky saysTemplate literals interpolate values, span multiple lines, and power tagged templates.
Inside backticks, ${...} embeds any expression — variables, math, function calls. They preserve line breaks, making multi-line HTML strings clean. Tagged templates (a function before the backticks) let you process the parts programmatically — the basis of libraries like styled-components.
Power-ups you unlock
${expr} embeds any expression
Multi-line strings with no \n needed
Great for building HTML/markup strings
Tagged templates process parts via a function
NaN the Trickster attacks — common mistakes
Forgetting the $ before the brace
Deeply nesting template literals into unreadable soup
XSS risk when interpolating untrusted data into HTML
Boss battleBuild a multi-line HTML card string with interpolated title and body.