Answers for "javavscript use .filter to return odd numbers in an array"

CSS
0

javavscript use .filter to return odd numbers in an array

let arr = [1,2,3,4,5,6,7,8,9,10,11,12]

let odds = arr.filter(n => n%2)

console.log(odds)
Posted by: Guest on July-10-2020

Code answers related to "javavscript use .filter to return odd numbers in an array"

Browse Popular Code Answers by Language