Skip to content

Instantly share code, notes, and snippets.

@micahasmith
Created January 8, 2012 00:51
Show Gist options
  • Select an option

  • Save micahasmith/1576651 to your computer and use it in GitHub Desktop.

Select an option

Save micahasmith/1576651 to your computer and use it in GitHub Desktop.
javascript-map-function
function map(func, list)
{
var i=0,
len=list.length,
res=[];
for (; i < len; i+=1)
{
res[i]=func(list[i]);
}
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment