Created
May 5, 2016 22:22
-
-
Save santiago-puch-giner/66268ecd3ea13b763044e9b735dd4dd5 to your computer and use it in GitHub Desktop.
Template string in Javascript (ES6)
This file contains hidden or 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
// Snippet for template strings (ES6) | |
let firstName = "Santi"; | |
let lastName = "Puch"; | |
// Instead of doing this... | |
console.log("My name is " + firstName + " " + lastName); | |
// Use this... | |
console.log(`My name is ${firstName} ${lastName}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment