Skip to content

Commit 7e85b08

Browse files
Added Array_Filter.js
1 parent fecfb35 commit 7e85b08

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Array_Filter.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
const Ages = [
3+
12,
4+
24,
5+
53,
6+
25,
7+
26,
8+
10,
9+
2,
10+
57
11+
];
12+
13+
// Return data that are not minor
14+
const adults = Ages.filter(age => age >= 18);
15+
16+
console.log(adults);

0 commit comments

Comments
 (0)