conventions.io

Tech Challenge

2026-10-08

🟨

Daily Tech Challenge

JavaScript

medium
Question 1 of 5

What does this code log, given that the parameter list has a default value?

Example
function f(a, b = () => a) {
  var a = 2;
  return [a, b()];
}

console.log(f(1));

Thursday, October 8, 2026 · A new challenge drops every day