4 ms·
Nobody thought about it or did that on purpose to confuse you with this particular example. If you would do js enough you still could be surprised at first but
by dzek69 8y ago
Nobody thought about it or did that on purpose to confuse you with this particular example. If you would do js enough you still could be surprised at first but then you'll see it's pretty valid behavior. map will pass value and key to the method given.
so it will call
parseInt('1', 0)
parseInt('1', 1)
parseInt('1', 2)