cf.completefrontend

Predict the outputHard

What does this tag function receive and return?

What does this log?
function tag(strings, ...values) {
  console.log(strings.length, values.length);
  console.log(JSON.stringify(strings));
  console.log(values);
  return strings.raw.join("|");
}
 
const a = 1;
const b = 2;
console.log(tag`${a} + ${b}\n`);

The answer

Work out every line it logs, in order. Then check.

Checking your sign-in…