Skip to content

Commit 708e2a2

Browse files
authored
Create arrayFalsyBouncer.js
1 parent 8f6a336 commit 708e2a2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const evenNumberSquared = [1,2,3,4].map(n => {
2+
if (n % 2 !== 0) {
3+
return null;
4+
}
5+
6+
return n * n;
7+
}).filter(Boolean);
8+
9+
console.log(evenNumberSquared)

0 commit comments

Comments
 (0)