Skip to content

Commit 4cdb846

Browse files
committed
solved : filterOdd
1 parent 2686aaa commit 4cdb846

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// write your codes
22
function solution(inputArray) {
3-
var isEven = function(value) {
4-
return value % 2 != 0;
5-
};
6-
var outputArray = inputArray.filter(isEven);
7-
return outputArray;
3+
return inputArray.filter((item) => item%2 === 1);
84
}
95

106
exports.solution = solution;

0 commit comments

Comments
 (0)