자바스크립트 map()

Jmnote (토론 | 기여)님의 2020년 7월 11일 (토) 22:08 판 (새 문서: ==개요== ;JavaScript map() <source lang='javascript'> members = [ { id: 102, name: 'Ashley Allen', address: 'Seoul' }, { id: 202, name: 'Peter Parker', address: 'New York' },...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

JavaScript map()
members = [
  { id: 102, name: 'Ashley Allen', address: 'Seoul' },
  { id: 202, name: 'Peter Parker', address: 'New York' },
  { id: 104, name: 'John Smith', address: 'Tokyo' }
]
console.log(members.map(x => x.address))
// [ 'Seoul', 'New York', 'Tokyo' ]


2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}