Last active
August 29, 2015 14:07
-
-
Save flarnie/7f41d38964d8976700e9 to your computer and use it in GitHub Desktop.
ES6 Template Literals
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
// ES6 template literals | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings | |
var id = 3; | |
var componentType = 'widget'; | |
var description = `This is ${componentType} number ${id}`; | |
// ES5 compatible syntax transpiled by es6-transpiler | |
// https://github.com/termi/es6-transpiler | |
var description = (("This is " + componentType) + (" number " + id) + ""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment