Skip to content

Instantly share code, notes, and snippets.

@kkismd
Created April 26, 2009 14:11
Show Gist options
  • Save kkismd/102043 to your computer and use it in GitHub Desktop.
Save kkismd/102043 to your computer and use it in GitHub Desktop.
function map(arr, fn) {
var result = [];
for (var i = 0; i < arr.length; i++) {
result[i] = fn(arr[i]);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment