Answers for "how to represent odd numbers 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
2

log odd numbers js

for(var n = 0; n <= 10; n+=2) console.log(n)
Posted by: Guest on March-02-2021

Browse Popular Code Answers by Language