Skip to content

Instantly share code, notes, and snippets.

@Aleksey-Danchin
Last active August 29, 2015 14:10
Show Gist options
  • Save Aleksey-Danchin/2e5c3d0a416656fda357 to your computer and use it in GitHub Desktop.
Save Aleksey-Danchin/2e5c3d0a416656fda357 to your computer and use it in GitHub Desktop.
It's a kind of magic JavaScript (part 1)
// It's a kind of magic JavaScript (part 1)
['10', '10', '10'].map(parseInt); // [ 10, NaN, 2 ]
['10', '10', '10'].map(Number); // [ 10, 10, 10 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment