Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

print odd numbers in an array in javascript

[1,2,3,4].forEach((num) => num % 2 === 0 && console.log(num));
 
PREVIOUS NEXT
Tagged: #print #odd #numbers #array #javascript
ADD COMMENT
Topic
Name
1+3 =