Javascript Shorts #1 — ES6 Template Literals(Strings)
Ben Garrison
3674

Thanks for the article, it’s always good to spread the word about valuable new features in JS.

About the code snippet example, it is not clear for the reader that what you put inside a backticked string is exactly what you will get. If you set two lines in the code, you’ll get two lines, there is no need for adding \n.

Compare this:

console.log( 'Follow ' + twitter.name + ' to read more\n' +
' awesome javascript shorts' )

to:

console.log( `Follow ${twitter.name} to read more
awesome javascript shorts` )

BTW: I think it’s worth mentioning in an extra line that template strings are wrapped in back-stick (`) characters. And having your code snippets in text instead of an image would help to copy/paste and try them out. :)

Good job!