Skip to content

Commit a9449f2

Browse files
committed
solve: forEachFilter
1 parent 5c0b9ee commit a9449f2

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

Challenge/JM Lim/filterOdd/solve.test.js

-28
This file was deleted.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 설명
2+
3+
배열 원소중 40 이상인 수만 뽑아 배열을 만드세요.
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const inputArray = [100, 10, 20, 40];
2+
3+
const answer = [];
4+
5+
inputArray.forEach(e => {
6+
e >= 40 ? answer.push(e) : ''
7+
})
8+
9+
console.log(answer);

0 commit comments

Comments
 (0)