Answers for "odd numbers with for loop in js"

CSS
1

Odd number function in javascript

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
0

odd number is javascript

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

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

console.log(odds)
 Run code snippetHide results
Posted by: Guest on October-12-2021

Code answers related to "odd numbers with for loop in js"

Browse Popular Code Answers by Language