Skip to content

Instantly share code, notes, and snippets.

@davidpadbury
Created February 4, 2016 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidpadbury/91589ee3f06ecbebe9af to your computer and use it in GitHub Desktop.
Save davidpadbury/91589ee3f06ecbebe9af to your computer and use it in GitHub Desktop.
var a = 5;
var b = 10;
function tag(strings, ...values) {
console.log(strings[0]); // "Hello "
console.log(strings[1]); // " world "
console.log(values[0]); // 15
console.log(values[1]); // 50
return "Bazinga!";
}
tag`Hello ${ a + b } world ${ a * b }`;
// "Bazinga!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment