Hint
Unary + is the shortest coercion to number. undefined and non-numeric strings produce NaN.
console.log(+'');
console.log(+null);
console.log(+undefined);
console.log(+true);
console.log(+'3.14');0 0 NaN 1 3.14
Explanation: +"" → 0. +null → 0. +undefined → NaN. +true → 1. +"3.14" → 3.14.
Key Insight: Unary + is the shortest coercion to number. undefined and non-numeric strings produce NaN.