629 B

Function map

Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.

Parameters

Parameter Type Description
x Matrix/array The container to iterate on.
callback function The callback method is invoked with three parameters: the value of the element, the index of the element, and the Matrix being traversed.

Returns

Type Description
Matrix/array container