Array.prototype.flat Map

GPTKB entity

Statements (20)
Predicate Object
gptkbp:instance_of gptkb:Mathematics
gptkbp:callback A function that is called for every element of the array.
gptkbp:callback_parameter gptkb:Index
gptkb:Matrix
current Value
gptkbp:data_return A new array with each element being the result of the callback function.
gptkbp:default_web_browser Supported in all modern browsers.
gptkbp:description Creates a new array with the results of calling a provided function on every element in the calling array, and then flattening the result by one level.
gptkbp:example [1, 2, 3].flat Map(x => [x, x * 2])
gptkbp:example_result [1, 2, 2, 4, 3, 6]
gptkbp:formulation array.flat Map(callback(current Value[, index[, array]])[, this Arg])
https://www.w3.org/2000/01/rdf-schema#label Array.prototype.flat Map
gptkbp:introduced_in ECMAScript 2019 (ES10)
gptkbp:related_method gptkb:Array.prototype.flat
gptkb:Array.prototype.map
gptkbp:supported gptkb:Internet_Explorer
gptkbp:this_arg Optional value to use as this when executing callback.
gptkbp:type Array method
gptkbp:bfsParent gptkb:Spider-Man
gptkbp:bfsLayer 4