Archive for September, 2016

Template Literals – Let’s Learn ES6 Sample Chapter

September 3rd, 2016 No Comments

Introduced in ES6 is a new way in which we can create a string, and that is the Template Literal. With it comes new features that allow us more control over dynamic strings in our programs. Gone will be the days of long string concatenation!

To create a template literal, instead of ' or " quotes we use the ` character. This will produce a new string, and we can use it in any way we want.


let newString = `A string`;

(more…)