ES6 Template Strings

node v4.9.1
version: 1.0.0
endpointsharetweet
In ES6 you can use template strings to more easily construct strings:
var person = { name: "Tom", age: 20 }; // Before: var string = person.name + " is " + person.name + " years old"; // Now: var string = `${person.name} 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: https://hacks.mozilla.org/2015/05/es6-in-depth-template-strings-2/
Loading…

26 comments

  • posted 2 years ago by jnee505
    http://instagram.com/f008
  • posted 2 years ago by varobalabanoglu1
    Varolbalabanoglu@gmail.com
  • posted 2 years ago by falconxunit
    How about chrome.
  • posted 2 years ago by ralitsa
    Hellow i nid you help me
  • posted 2 years ago by btmh2003
    Está bonito lindo día para que sientas mal
  • posted 2 years ago by 5a590a66b67f620012817bc8
    Good
  • posted 2 years ago by florin
    Good
  • posted a year ago by 5a8f236f78679e0012cbc9a9
    can you help me to
  • posted a year ago by rake
    Good coordinator
  • posted a year ago by kingvader
    Can you help me
  • posted a year ago by mohdakram
    Can you help me plzz
  • posted a year ago by sherrielee
    Hello i need someone to help me please
  • posted a year ago by retweett511
    Twitter followers follow tweets and Facebook META data transfer t retweett511
  • posted a year ago by tamu18115
    automobileservices.org
  • posted a year ago by nelson1576
    Hello i need someone to help me please
  • posted a year ago by anspage
    окончателен
  • posted a year ago by kenza
    M'yfrench
  • posted a year ago by binroq0
    Thanks
  • posted 10 months ago by ashimmg4
    Mmmmmm
  • posted 10 months ago by viloka
    Help me plz
  • posted 10 months ago by nbaboy342
    Hey
  • posted 10 months ago by 5bdf16a8044148001354017b
    Home 102 it show
  • posted 9 months ago by quangthong81
    Concat
  • posted 7 months ago by 5c3e8cb77bc7300012929b96
    su-wan.examples.io
  • posted 2 months ago by borathyun
    Vous avez mis trop de temps pour faire le virement et le transfert de mon argent. Ce compte doit être normalement soldé depuis Décembre 2018, et nous sommes déjà en Juin 2019. On doit me payer 10% d'intérêts de retard dès le 25/6/2019 et 20% d'intérêts de retardet ainsi de suite Merci Borath YUN
  • posted a month ago by diouldebalde
    http://diouldehome.wordpress.com

sign in to comment