MAP
Transforms each value of the specified array into a new value using a formula.
Syntax
=MAP(array, expression)
Arguments
Argument | Type | Description |
---|---|---|
array | Array | Array of elements |
expression | Lambda | Transformation to perform on each item of the array |
Examples
=MAP(ARRAY(1, 2, 3), x => x * x)
→[1, 4, 9]
MAP
function is called for each item in the array (the values 1, 2, and 3). For each item, the value is multiplied by itself, resulting in an array containing the square of each value: [1, 4, 9].
Updated 10 months ago