Skip to content

Commit 931a254

Browse files
authored
Merge pull request #92 from front-studium/sgoldenbird
`week22` 풀었습니다.
2 parents f38f0d4 + 7a21a5b commit 931a254

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function solution(numbers) {
2+
return numbers.map((num) => num * 2);
3+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function solution(array, n) {
2+
let count = 0;
3+
4+
for (let el of array) {
5+
if (el === n) count++;
6+
}
7+
8+
return count;
9+
}
10+
11+
// filter/reduce로 푸는 것도 가능

0 commit comments

Comments
 (0)