Created
June 1, 2018 21:39
-
-
Save nodlAndHodl/0057bf6d8d7c7a2dec3d5569d6780efa to your computer and use it in GitHub Desktop.
Template Literals in ES6
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
//instead of doing string concatenation like so: | |
let name = "Nick"; | |
let last = "Dude"; | |
let full = "My name is " + name + " " + last; | |
// we can do the following in ES6 for string literals using template | |
let redo = `My name is {name} {last}!`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment