reduce() 메서드는 배열의 각 요소에 대해 주어진 리듀서(reducer) 함수를 실행하고, 하나의 결과값을 반환한다. *리듀서(reducer) : 현재 상태와 액션 객체를 파라미터로 받아와서 새로운 상태를 반환해주는 함수. const array1 = [1,2,3,4]; // 0 + 1 + 2 + 3 + 2 const initialValue = 0; const sumWithInitial = array1.reduce( (previousValue, currentValue) => previousValue + currentValue, initialValue ); console.log(sumWithInitial); // expected output : 10 리듀서 함수는 네 개의 인자를 가진다. - 누산기 (..