Patternite Logo

Template literals in JavaScript

0

A brief and basic overview of using template literals to write cleaner strings in JavaScript

Loading...

Template literals are a cleaner way to incorporate expressions into your strings, introduced in ES6. The key syntactic components are the use of backticks around the template string, and the placeholder ${ } that wraps expressions.

The MDN docs have a great, in-depth overview of template literals, as well as the more advanced "tagging" feature.

Profile picture for duncster

| edited

Patternite © 2021

Patternite Logo