function test(arr){ var len = arr.length; for(var i=0; i arr[i] = functionToApply(arr[i]); } return arr;}