<html>
<head>
<meta charset="UTF-8" />
<title>출력결과</title>
</head>
<body>
<script>
function solution(day, arr) {
let answer = 0;
for (let x of arr) {
if (x % 10 === day) answer += 1;
}
return answer;
}
arr = [25, 23, 11, 47, 52, 17, 33];
console.log(solution(3, arr));
</script>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>출력결과</title>
</head>
<body>
<script>
function solution(day, arr){
let answer=0;
for(let x of arr){
if(x%10==day) answer++;
}
return answer;
}
arr=[25, 23, 11, 47, 53, 17, 33];
console.log(solution(3, arr));
</script>
</body>
</html>