Ad
  • Custom User Avatar

    Nice, everything about this code is great, its readable like reading a bood nah its like looking at an image its so descriptive that u only need 30 ms of looking at it to get the idea, i never understood really the idea the even and odd even if i was thinking i do and i don't, but this code make me REALLy understand the idea, even my life changed after reading this code, now im way openminded and i feel like i seen everything in life now and i can die happily, also we don't even talk how efficient this code is, its so effitient that u didn't have to write a single letter no a number for it to work like how is it even working, no one really knows, and im now going to be a more positif person after this, i will go to gim and i will study harder and be more social and eat better and maybe practise a sport like football and go to qatar to play for the world cup, but they are already playing :( does that mean i give up NO i never give up i will go there and play and win AAAAAA and after that i will buy a car and drive it antil it ends, then i will fly a plane antil the world ends but before that i will ride a boat antil it sinks and i will discover the bottom of the ocean and its secrets and beuatiful creatures, then i will swim with dolphins and fish then i will go to the dessert and eat some date then i will go to the everest mountain and climb it antil it ends i will grab some snow from there and throw it antil it becomes water then i will go back to my beuatifil mantion and sleep in my cozy bed antil i wake up, then i will say good bye. <3

  • Default User Avatar
  • Custom User Avatar

    very good

  • Custom User Avatar
  • Custom User Avatar

    Nice tests you wrote...

  • Default User Avatar

    It would have worked if you had changed console.log() with return, and place the elements in a function. As the result of your code is not being displayed in the console, but being tested, and thus needs to have the result returned. Keep up the good work.

    ` function evenOrOdd ( number = prompt("Enter a number: ") ) {

    if (number % 2 == 0){

      return  "The number is even.";
    

    } else{

       return  "The number is odd.";
    

    }

    }`

    I hope that it helps.