Friday 23 October 2020

ES6 / ECMA6 template literals - not working

I wanted to try using template literals and it's not working: it’s displaying the literal variable names, instead of the values. I am using Chrome v50.0.2 (and jQuery).

Example:

console.log('categoryName: ${this.categoryName}\ncategoryElements: ${this.categoryElements} ');

Output:

${this.categoryName} 
categoryElements: ${this.categoryElements} 


from ES6 / ECMA6 template literals - not working

No comments:

Post a Comment