Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How To Use The Most Used Array Method - Map

const people = [{ name: "Kyle", age: 26 }, { name: "Jill", age: 35 }]
const peopleNames = []
for (let i = 0; i < people.length; i++) {
  peopleNames[i] = people[i].name
}
console.log(peopleNames)
// ["Kyle", "Jill"]
Source by blog.webdevsimplified.com #
 
PREVIOUS NEXT
Tagged: #How #To #Use #The #Most #Used #Array #Method #Map
ADD COMMENT
Topic
Name
3+1 =