arrayMap

arrayMap(array array, function callback) → array newArray
Returns a new array containing, for each key in the source array, the value returned by the callback function. If the callback function takes one parameter, the source array's value is sent; if it takes two parameters, the first is the key and the second is the value.

Returns a new array containing, for each value of the source array array, the value returned by the callback function.

The callback function takes 1 to 3 parameters, in this order: (value, position, source array).

Parameters
Return
Notes