Skip to content

Commit

Permalink
Update template-string.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gregegan committed Jan 28, 2016
1 parent bc41a5d commit 3e43d4d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion template-string.js
Expand Up @@ -5,4 +5,20 @@
var x = "foo";
var y = "bar";

var join = `${x} ${y}`; // foo bar
// es5
var join = x + ' ' + y; // foo bar

// es6
var join = `${x} ${y}`; // foo bar

/*
foo
bar
*/

// es5
var join = x + '\n' + y;

// es6
var join = `${x}
${y}`;

0 comments on commit 3e43d4d

Please sign in to comment.