Skip to content

Commit 5cad0f1

Browse files
committed
added evenNumber to math.js
1 parent 982334e commit 5cad0f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

math/evenNumbers.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Check For Even Numbers
2+
// Author: Abejide Femi
3+
4+
function evenNumber(arr) {
5+
return arr.filter(a => a % 2 === 0);
6+
}
7+
console.log([1,2,5,6,8,12]) // returns [2,6,8,12]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy