Skip to content

Commit 37deffb

Browse files
committed
중복된 숫자 갯수 / 기초
1 parent af71e59 commit 37deffb

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function solution(array, n) {
2+
var answer = 0;
3+
for(let i=0 ; i<array.length; i++) {
4+
if(n == array[i]){
5+
answer += 1;
6+
}
7+
}
8+
return answer;
9+
}
10+
11+
function solution(array, n) {
12+
return array.filter(element => element === n).length;
13+
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)