We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae2ccaf commit 5362b48Copy full SHA for 5362b48
Week2/homework/map_filter.js
@@ -10,9 +10,6 @@ const oddOnes = numbers.filter(i => i % 2 != 0)
10
11
//Double the odds and kick out the evens:
12
13
-const oddDoubling = oddOnes.map(i => {
14
- if (i % 2 != 0) {return i * 2;}
15
- else {return i;}
16
-})
+const oddDoubling = oddOnes.map(i => i * 2)
17
18
console.log("Doubled lucky odds: " + oddDoubling + "\nUnlucky kicked evens: " +oddOnes);
0 commit comments