We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2159fd commit 12ffb31Copy full SHA for 12ffb31
imchanyo/[week1]Array/Number_of_duplicate_numbers.js
@@ -0,0 +1,11 @@
1
+function solution(array, n) {
2
+ var answer = [];
3
+
4
+ array.forEach((num) => {
5
+ if (num === n) {
6
+ answer.push(num);
7
+ }
8
+ });
9
10
+ return answer.length;
11
+}
0 commit comments