Last active
September 2, 2017 23:32
-
-
Save pbzona/6f8791d59fe9c466bb5adc858cb4d442 to your computer and use it in GitHub Desktop.
Template tagging example 2
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
function templateTag(strings, personName) { | |
return strings[0] + personName; | |
} | |
var name = 'Phil' | |
var someString = templateTag`My name is ${name}` | |
console.log(someString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment