O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 7. Template literals

After reading lesson 7, you will

  • Know how to achieve string interpolation with template literals
  • Understand how to use multiline strings with template literals
  • Know how to make reusable templates with template literals
  • Understand how tagged template literals can add custom processing to template literals

In JavaScript, one of my biggest annoyances has always been the lack of support for multiline strings. Having to break each line into a separate string and glue them all together is a tedious process. With the addition of template literals, that pain is gone, along with some others. Template literals introduce multiline strings to JavaScript, as well as interpolation and tagging. Don’t worry if you’re unsure what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required