Skip to content

Instantly share code, notes, and snippets.

@danomanion
Created December 22, 2019 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danomanion/3b88df631dc2bfc9bbfee73bb9da3353 to your computer and use it in GitHub Desktop.
Save danomanion/3b88df631dc2bfc9bbfee73bb9da3353 to your computer and use it in GitHub Desktop.
JavaScript: Map()
const list = [{ name: "abc", age: "99"}, { name: "efg", age: "100"}, { name: "hij", age: "101"}]
const newList = list.map(x => x.name)
console.log(newList)
console.log(newList)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment