Skip to content

Commit 13cf905

Browse files
committed
uw
1 parent 60a725d commit 13cf905

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

heigherorder.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const arr=[5,1,3,2,6];
2+
//using the map funcition in order to make the transformation
3+
function isodd(x){
4+
return x%2;
5+
}
6+
const output = arr.filter(isodd);
7+
console.log(output);

0 commit comments

Comments
 (0)