Last active
November 6, 2016 23:15
-
-
Save victorvhpg/9703cd836dfb3de6744e3c0e5df6e3ce to your computer and use it in GitHub Desktop.
tag.js
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 tagTeste(arrayString, ...arraySubstituicoes) { | |
console.log(arrayString);// ["oi "," tudo bem?"] //também possui a propriedade .raw que é a string crua | |
console.log(arraySubstituicoes);//["teste"] | |
return "olá"; | |
} | |
var a = "teste"; | |
var b = tagTeste`oi ${a} tudo bem?`; | |
console.log(b); //olá |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment