Hint
Default parameters only trigger for undefined, not null. null is a deliberate value meaning "no object" β it does not fall back to the default.
function fn(x = 10, y = x * 2) {
console.log(x, y);
}
fn();
fn(3);
fn(3, 5);
fn(null);
fn(undefined);10 20 3 6 3 5 null NaN 10 20
Explanation: No args: both defaults apply, y = 10*2 = 20. fn(3): x=3, y=3*2=6. fn(3,5): both provided. fn(null): null is NOT undefined β x=null (NaN when doubled). fn(undefined): undefined triggers default x=10.
Key Insight: Default parameters only trigger for undefined, not null. null is a deliberate value meaning "no object" β it does not fall back to the default.