Skip to content · ⁨본문 바로가기⁩

Array methods · ⁨배열 메소드⁩

English

Array methods

  • .map(fn) makes a new array by transforming each item.
  • .filter(fn) makes a new array of only the items where fn returns true.
  • .forEach(fn) runs fn for each item, making no new array.

한국어

배열 메서드

  • .map(fn)은 각 항목을 변환하여 새로운 배열을 만듭니다.
  • .filter(fn)은 fn이 true을 반환하는 항목만 포함하는 새로운 배열을 만듭니다.
  • .forEach(fn)는 각 항목마다 fn를 실행하며, 새로운 배열을 만들지 않습니다.

map은 모든 항목을 변환하고, filter는 테스트를 통과한 항목만 유지합니다

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP