You are viewing a single comment's thread. Return to all comments →
javascript
let n;
if(n%2 != 0){ console.log("Weird");}
else if(n%2 == 0){ if(2<=n<=5){ console.log("Not Weird"); } else if(6<=n<=20){ console.log("Weird"); } else if(n > 20){ console.log("Not Weird"); }
i did like that but 24 return weird i dont know why i tried on visual studio code it return Not weird, anybody know thats why?
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Intro to Conditional Statements
You are viewing a single comment's thread. Return to all comments →
javascript
let n;
if(n%2 != 0){ console.log("Weird");}
else if(n%2 == 0){ if(2<=n<=5){ console.log("Not Weird"); } else if(6<=n<=20){ console.log("Weird"); } else if(n > 20){ console.log("Not Weird"); }
}