Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of ES6 String Interpolation
/* ES5 */
var purpose = 'cat videos';
var message = 'The internet is for ' + purpose + '.';
/* >= ES6 */
var purpose = 'cat videos';
var message = `The internet is for #{purpose}.`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment