What is mapping in …
 
Notifications
Clear all

What is mapping in java script?

1 Posts
2 Users
0 Likes
372 Views
0
Topic starter

Explain Briefly.

1 Answer
0

In JavaScript, mapping is the process of creating a new array from an existing array by applying a function to each element of the original array. The function can be used to transform the elements in any way, such as by converting them to a different type, formatting them, or performing some other operation.

The map() method is used to perform mapping in JavaScript. The map() method takes two arguments: a function and an array. The function is called once for each element in the array, and the return value of the function is used to create a new element in the new array.

Share: