[Solved] Checking If Number is Even/Odd (Error)


I am stuck on a part for More on Control Flow in JS, since I get a syntax error.

var isEven = function(number) {
  // Your code goes here!
  if (number%2==0){
if (isNaN(number)){
    return("Input is not a number")


Replace this line with your code.


lets look at the instructions:

Add an else if branch to your existing if/else statement

did you add else if? No, you added else. Did you add it to your existing if/else branch? You didn't

Please try to fix those issues


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.