Callback function 정의
- 다른 함수의 매개 변수(인자) 로 사용되는 함수
- 어떤 특정 시점(이벤트가 발생했을 때) 호출되는 함수 // 이벤트 예시 : 클릭
예시)
코드 참고 https://www.w3schools.com/js/js_array_iteration.asp
JavaScript Array Iteration
JavaScript Array Iteration Methods Array iteration methods operate on every array item. Array.forEach() The forEach() method calls a function (a callback function) once for each array element. Example var txt = ""; var numbers = [45, 4, 9, 16, 25]; numbers
www.w3schools.com