Spot the bug in the timeout fallback

from Constraint-rich prompts
Node 24 intermediate 4 min 1 issue to find

The prompt says an omitted timeout defaults to 5,000 ms and an explicit zero disables waiting. Find the compatibility bug.

JavaScript
function timeoutMs(value) {
  return value || 5000;
}

console.log(timeoutMs(undefined));
console.log(timeoutMs(0));
Open in playground
Report an error