9.More on control flow- ex. 1


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-qDwp0/0/1?curriculum_id=506324b3a7dffd00020bf661


Replace this line with your code. 
var isEven = function(number) {
  // Your code goes here!
  var n = Math.floor(Math.random()*5);
  if(n % 2===0){
     return true;
  }
  else{
     return false;
  };
};


#2

the exercise is going to call the function multiply times, so you should check if number (the function parameter) is even or odd


#4

the exercise is going to call the function to validate your function is working correctly, so each time the function gets called, number will hold an actual number of which you need to check it is even or odd, so then the if condition becomes something like this:

if(number % 2 == 0)

remove the the random number generator.


#5

oh, i see..., thank you!