Skip to content

Instantly share code, notes, and snippets.

@forrestbe
Created October 28, 2016 12:26
Show Gist options
  • Select an option

  • Save forrestbe/5974ec7c727e62bfcfda11ab2d943d13 to your computer and use it in GitHub Desktop.

Select an option

Save forrestbe/5974ec7c727e62bfcfda11ab2d943d13 to your computer and use it in GitHub Desktop.
With ES6 we don't have to do more nesting concatenation
// ES5
var first = 'Forrest';
var last = 'Brownlie';
console.log('My name is ' + first + ' ' + last + '.');
// My name is Forrest Brownlie
// ES6
const firstName = 'Forrest';
const lastName = 'Brownlie';
console.log(`My name is ${firstName} ${lastName}`);
// My name is Forrest Brownlie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment