if you also want it fast... Array.prototype.map is not so fast as a loop.
http://jsperf.com/array-map-vs-loop/2
so:
function customMap(a,c){
var b=[],l=a.length;
while(l--){
b[l]=c(a[l]);
}
return b;
}
and return it with
var newArray=customMap(oldArray,function);
this is very fast.
you can also create a custom prototype.
Object.defineProperty(Array.prototype,'CMap',{value:function(c){
var b=[],l=this.length;while(l--){b[l]=c(this[l])}
return b;
},writable:false,enumerable:false});
and use it like map.
var newArray=oldArray.CMap(function);
EDIT
here is the test on jsperf...
http://jsperf.com/custom-vs-map
every variable is defined outside the test... so speed is based only on the custom function.
and this works on all browsers.