DEV Community

Discussion on: Template literals in JavaScript

Collapse
 
pentacular profile image
pentacular • Edited

Just to be clear, in ecmascript.

'hello' // string literal.
"hello" // string literal.
`hello` // template literal (not a string literal)

ecma-international.org/publication...

Otherwise you may end up confusing people. :)

Collapse
 
laurieontech profile image
Laurie

We’re not good about consistent wording. You’ll see template literal and string literal used even if it isn’t the official wording in the spec. But yes, I tried to include the various terms since it’s confusing.
I would have named the post template literals but I was matching my original tweet.