Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in...
by weaksauce on Friday June 21, 2019 @11:33AM
(#20243392)
parseInt will use the first few characters in the string as a heuristic to determine the radix. It’s not reliable for some types of common decimal strings(padded zeros will cause erroneous parsing)
[ Parent
| on HN ]
There are no comments on this comment yet.