Skip to content

Instantly share code, notes, and snippets.

@sudomabider
Last active November 9, 2017 23:59
Show Gist options
  • Save sudomabider/81699ad30b972e692ac7afb1bd777e18 to your computer and use it in GitHub Desktop.
Save sudomabider/81699ad30b972e692ac7afb1bd777e18 to your computer and use it in GitHub Desktop.
Interesting coding questions

What will it be?

Javascript

// Without running these in the browser, can you tell what each of the following would return?
['1', '2', '3', '4'].map(parseInt);

(new Array(2)).map(function() {
  return 1;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment