Last active
May 2, 2018 20:23
-
-
Save sarahquigley/3ad4c6abe8809ecafe53e787ebd31bc6 to your computer and use it in GitHub Desktop.
Example of ES6 String Interpolation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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