Skip to content

Instantly share code, notes, and snippets.

@zerok
Created December 1, 2016 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerok/074ee3b531b67265da9ec0903031ba5f to your computer and use it in GitHub Desktop.
Save zerok/074ee3b531b67265da9ec0903031ba5f to your computer and use it in GitHub Desktop.
map on undefined
[1, undefined, 2].map(v => v+1)
# [ 2, NaN, 3 ]
(new Array(5)).map(v => v+1)
# [ , , , , ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment