Question 70 of 10070%
70
What does this tagged template literal log?
function tag(strings, ...values) {
return strings.reduce((acc, str, i) => {
return acc + str + (values[i] !== undefined ? `[${values[i]}]` : "");
}, "");
}
const name = "World";
const count = 3;
console.log(tag`Hello, ${name}! You have ${count} messages.`);
70/100