News for hackers. Stuff that matters.
Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in... by bemmu on Friday June 21, 2019 @12:06PM (#20243746)
If you want to get terse

    ['1', '7', '11'].map(x => +x)
Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in... by plausibilities on Friday June 21, 2019 @02:46PM (#20245271)
If I didn't care about rounding I'd just use a primitive constructor

    ['1', '7', '11'].map(Number)
Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in... by jacobolus on Friday June 21, 2019 @12:21PM (#20243891)
This coerces to a number, but not to an integer.
Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in... by reaktivo on Friday June 21, 2019 @01:30PM (#20244614)
I would hate to see it in code that is being shared in a team, but the following works:

['1', '7', '11'].map(x => ~~x)