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
This is because map is calling parseInt with two arguments: the element and the index. The index ends up being used as the radix. So, this is what's happening:
parseInt(134,0)// => 134parseInt(135,1)// => NaNparseInt(1212,2)// => 1parseInt(33,3)// => NaN
@ilya1st yeah, it's not a bug, just a common mistake many people (especially beginners) do :)
But if you ever actually find an bug in V8, feel free to submit it directly to the V8 issue tracker. Thanks!
perhaps, I've found interpreter bug. I can reproduce them on Chromium 57.0.2987.98 and on node 6.10.0
I need filter number in array, so I did the following:
So the result was following:
This is not correct behaviour of Array.prototype.map or parseInt or interpreter.
This code works corect:
The text was updated successfully, but these errors were encountered: