ES6 Template Strings

node v4.8.7
version: 1.0.0
In ES6 you can use template strings to more easily construct strings:
var person = { name: "Tom", age: 20 }; // Before: var string = + " is " + + " years old"; // Now: var string = `${} is ${person.age} years old`;
Template strings also allow you to write multi-line strings:
var string = `This is<br/> a multi-line string<br/> without having to use<br/> any tricks. Pretty userful<br/> for HTML`
For much more advanced template strings, check out:


  • posted 7 months ago by jnee505
  • posted 7 months ago by varobalabanoglu1
  • posted 6 months ago by falconxunit
    How about chrome.
  • posted 6 months ago by ralitsa
    Hellow i nid you help me
  • posted 4 months ago by btmh2003
    Está bonito lindo día para que sientas mal
  • posted 11 days ago by 5a590a66b67f620012817bc8
  • posted 4 days ago by florin

sign in to comment