Skip to content

Instantly share code, notes, and snippets.

@jericrealubit
Forked from sudomabider/questions.md
Created November 9, 2017 23:59
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 jericrealubit/8d8e6c87fd63d765f05ffb3805f5a274 to your computer and use it in GitHub Desktop.
Save jericrealubit/8d8e6c87fd63d765f05ffb3805f5a274 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