자바스크립트-알고리즘-문제풀이/ 10부제

자바스크립트-알고리즘-문제풀이/ 10부제

function solution(n, arr) {

let newArr = [];

for (let item of arr) {

if (item % 10 === n) {

newArr.push(item);

}

}

return newArr.length;

}

let arr = [25, 23, 11, 47, 53, 17, 33];

console.log(solution(5, arr));

from http://dhstory311.tistory.com/166 by ccl(A) rewrite - 2021-10-01 23:00:39