안녕하세요, Will 입니다. 오늘은 배열(Array)의 forEach를 설명하도록 하겠습니다. 1. forEach 사용법 아래 코드를 보자 1 2 3 4 5 6 var arr = [1,2,3,4,2]; arr.forEach(function(element, index, all){ console.log(`${element}: ${index} :${all}`); console.log(this.ten); },{ten:10}); Colored by Color Scripter cs forEach문은 위와 같이 function을 Parameter로 가지며, 콜백 함수라고 한다. 콜백 함수는 배열의 element 하나 씩 읽어가며 호출된다. 즉 element 수(Length) 만큼 호출된다. 콜백 함수의 Parame..