Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created January 8, 2013 17:30
Show Gist options
  • Save rwaldron/4485855 to your computer and use it in GitHub Desktop.
Save rwaldron/4485855 to your computer and use it in GitHub Desktop.
// From Ben Alman:
Array.apply(null, {length: 5}).map(Function.prototype.call, Number);
// ...Which is way cooler then my original:
Array.apply(null, new Array(5)).map(function(v, k) { return k; });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment