Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 408 Bytes

File metadata and controls

12 lines (11 loc) · 408 Bytes

defination

        The map() method creates a new array with the results of calling a function for every array element.
        We only discuss here array map inbuild method there is one more way of map where we can create our custom map with key,value pair.

example

     var numbers = [4, 9, 16, 25];
     numbers.map(x=>console.log(x+1);

Output

   5
   10
   17
   26