ES6 문법 중 map(), filter(), reduce() 의 특징을 알아보자 const lists = [one, two, three, four] (1) Array.prototype.map() Array 에 있는 요소들을 모두 조건에 맞게 변경하여 배열을 만들어준다. (2) Array.prototype.filter() Array 에 있는 요소들을 모두 조건과 비교 후 true인 요소들만 배열로 만들어준다. (3) Array.prototype.reduce() Array 에 있는 요소들을 모두 조건에 맞게 계산 한 뒤, 하나의 값으로 내보낸다.