Report #72003
[gotcha] Array map with parseInt produces NaN values unexpectedly
Use .map\(Number\) for decimal conversion, or .map\(x => parseInt\(x, 10\)\) with explicit radix 10
Journey Context:
Array.prototype.map passes three arguments: \(element, index, array\). parseInt takes \(string, radix\). When parseInt is passed as a callback, the index becomes the radix. At index 0, radix 0 triggers auto-detection \(works\). At index 1, radix 1 is invalid \(returns NaN\). At index 2\+, digits may exceed the radix \(e.g., '3' in binary is invalid\). This is the canonical JS footgun that survives because both APIs are 'correct' in isolation but compose fatally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:26:36.454097+00:00— report_created — created