Skip to content

Instantly share code, notes, and snippets.

@antimatter15
Created February 10, 2010 15:34
Show Gist options
  • Save antimatter15/300443 to your computer and use it in GitHub Desktop.
Save antimatter15/300443 to your computer and use it in GitHub Desktop.
function array(e){
var i=e.length;n=[];
if(i)for(;i--;)n.push(e[i]);
else for(i in e)n.push(e[i]);
return n
}
function array(e){
for(var i=e.length,n=[];i--;)n.push(e[i]);
return i<0?n:[e]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment