function solution(num_list) {
const res = num_list.reduce((acc, cur) => {
cur % 2 == 0 ? acc[0]++ : acc[1]++;
return acc;
}, [0,0])
return res;
}
function solution(num_list) {
let answer = [0,0];
for(let a of num_list){
answer[a%2] += 1
}
return answer;
}