Skip to content

Commit fd20195

Browse files
committed
중복된 숫자 개수
/ 기초
1 parent 8124698 commit fd20195

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// 정수가 담긴 배열 array와 정수 n이 매개변수로 주어질 때,
2+
// array에 n이 몇 개 있는 지를 return 하도록 solution 함수를 완성해보세요.
3+
4+
function solution(array, n) {
5+
return array.filter((v) => v === n).length;
6+
}

0 commit comments

Comments
 (0)