Created
December 3, 2015 15:39
-
-
Save mgdm/a9449b9b1e822dc65bc8 to your computer and use it in GitHub Desktop.
Explain this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var input = ['1', '2', '3']; | |
var a = input.map(parseInt); | |
console.log(a); // [ 1, NaN, NaN ] | |
var b = input.map(n => parseInt(n)); | |
console.log(b); // [ 1, 2, 3 ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment