Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 762 Bytes

js-template-string-literals.md

File metadata and controls

25 lines (18 loc) · 762 Bytes
title summary tags goal date
Javascript template literals
interpolate expressions within strings
Javascript
Front-End Engineering
2019-06-09

Javascript template literals are string literals that support embedded expressions, like double quoted "foo %{bar} etc" strings in Ruby. You can use multi-line strings and string interpolation features with them. They were called "template strings" in prior editions of the ES2015 specification.

syntax: string text ${expression} string text

Handily, multi-line strings and newlines are both allowed.

The downside? Syntax highlighting in editors doesn't really work so well.

Read the docs.