DEV Community

Upali Khanduri
Upali Khanduri

Posted on

Javascript MAP method

A simple example for map method in javascript

Example-

Const numbers= [15,2,25,23];
Const newArr= numbers.map(myFun);

function myFun(num){
return num* 100
}

Top comments (2)

Collapse
 
hasterisk profile image
hasterisk

method and function are different

Collapse
 
frankwisniewski profile image
Frank Wisniewski

Const <=> const