map() 메서드는 배열 내의 모든 요소 각각ㅇ 대하여 주어진 함수를 호출한 결과를 모아 새로운 배열을 반환합니다. const array1 = [1, 4, 9, 16]; // Pass a function to map const map1 = array1.map((x) => x * 2); console.log(map1); // Expected output: Array [2, 8, 18, 32] 구문 arr.map(callback(currentValue[, index[, array]])[, thisArg]) 🎈 매개변수 - callback 새로운 배열 요소를 생성하는 함수 다음 세가지 인수를 가집니다. 1. currentValue 처리할 현재 요소 2. index: optional 처리할 현재 요소의 인덱스 ..