Day 3: Intro to Conditional Statements

  • + 0 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?
    

    }