You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like this classic gem should also be included (if it is not there already and I missed it):
[1,2,3].map(parseInt)
// [ 1, NaN, NaN ]
Explanation: map passes three arguments to parseInt for each iteration, and parseInt accepts the second argument (undefined) as radix, and fails silently. [1,2,3].map((x) => parseInt(x)) works.
I feel like this classic gem should also be included (if it is not there already and I missed it):
Explanation:
map
passes three arguments toparseInt
for each iteration, andparseInt
accepts the second argument (undefined
) as radix, and fails silently.[1,2,3].map((x) => parseInt(x))
works.Links:
Doc:
The text was updated successfully, but these errors were encountered: