For Example, on running the below code -
let a = 5;
let b = 10;
function print(strings, ...values) {
console.log(strings[0]);
console.log(strings[1]);
console.log(strings[2]);
console.log(values[0]);
console.log(values[1]);
}
print `add${a + b}mul${a - b}`;
Following Output is received -
"add"
"mul"
""
15
-5
Why there is an extra string literal at the end, even when i provided only only two, add and mul ?