Javatpoint Logo
Javatpoint Logo

JavaScript TypedArray map() Method

The JavaScript map() method form a new array creates a new typed array with the results of calling a provided function on every element in this typed array.

NOTE: map() method does not change the actual array.



Value(Required): The value of the current element.

Index(Optional): The array index of the current element.

arr(Optional): The array map() was called upon.

ThisValue(Optional): A value to be passed to the function to be used as its "this" value.

Return value:

A new array.

Browser Support:

Chrome Yes
Safari Yes
Firefox 1.5
Opera Yes

Example 1

JavaScript map() Method

Test it Now



Example 2

JavaScript map() Method

Test it Now



Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA