Mehdi9721 / JS_BY_SELF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS_BY_SELF

MAP

map is used to get data from the array of objects,Map will not modify the original array but it will copy the array for performing operations.

let person=[{name:"ali"},{name:"abbas"}]
const a=person.map((res)=>res.name)

here we are making a callback function inside a map function and calling name through res argument.

About