The jQuery map() function translates all items in an object or in array to a new array of items. It applies a function to each item of the object or array and maps the results into a new array.
Interviews2 answers
What is the use of map() in jquery?
2 Answers
Rajeev KumarPosted Mar 1, 2023, 9:01 AM EST
The map() method creates a new array with the results of calling a function for every array element.
var numbers = [4, 9, 16, 25];
function myFunction() {
var a = numbers.map(Math.sqrt);
}
Gajendra JangidPosted Jan 25, 2018, 2:41 AM EST

