Every

    [드림코딩] 유용한 배열(array) api (2) : filter, map, some, every

    class Coder { constructor(name, age, enrolled, score) { this.name = name; this.age = age; this.enrolled = enrolled; this.score = score; } } const coders = [ new Coder('A', 29, true, 45), new Coder('B', 28, false, 80), new Coder('C', 30, true, 90), new Coder('D', 40, false, 66), new Coder('E', 18, true, 88), ] filter enrolled가 true인 코더만 골라 새로운 배열을 만들어보자. const result = coders.filter((coder) => co..