I'm using tagged template strings in following code
var a = 5;
var b = 10;
var pp="";
function tag(strings, ...values) {
pp+=strings[0]; // "Hello "
pp+=strings[1]; // " world "
pp+=values[0]; // 15
pp+=values[1]; // 50
console.log(pp+"Bazinga!");
}
tag`Hello ${ a + b } world ${ a * b}`;
but it gives
Uncaught SyntaxError: Unexpected token ...(…)
On function tag(strings, ...values) {