Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 502 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 502 Bytes

JavaScript - Map method

Map is one of the methods to traverse the arrays.

It will be used to return the updated values of an array by not changing the original array.

It will take callback as input and selects the elements to update and returned based on the expression inside the callback.

The callback function would be excuted for every element of the array.

  • Syntax:
    const newArray = Array.map((parameter) => {
        return // updattion expression;
    });