function solution(lottos, win_nums) {
const arr = [];
let max = 0;
let min = 0;
lottos.map((num) => {
if (num === 0) {
max++;
}
for (let i = 0; i < win_nums.length; i++) {
if (num === win_nums[i]) {
max++;
min++;
}
}
});
arr.push(max, min);
const answer = arr.map((num) => {
if (num === 6) return (num = 1);
if (num === 5) return (num = 2);
if (num === 4) return (num = 3);
if (num === 3) return (num = 4);
if (num === 2) return (num = 5);
else return (num = 6);
});
return answer;
}