0

How to find odd number till 101

19th Oct 2019, 7:30 PM
keshab palit
2 Respostas
+ 4
if(variable%2==0){ //even } else{ //odd }
19th Oct 2019, 7:40 PM
Odyel
Odyel - avatar
+ 1
var i; for(i = 1; i < 101; i += 2) { console.log(i); }
19th Oct 2019, 8:25 PM
Matt Watkins
Matt Watkins - avatar