If / else if / else


#1


If / else if / else

error: Oops, try again. It looks like you have a ReferenceError! Maybe you deleted isEven?

var isEven = function(number) {

if (number % 2 === 0) {
    return true;
}
else if (isNaN(number) = false) {
    return "That aint a number"
}
else {
    return false
}
};


#2

else if (isNaN(number) = false)

a single equal sign means assign, are you sure this is what you want here?

also isNaN returns true if not a number


#3

ah its a triple equal mark, oppsi

but I didnt get this part:
also isNaN returns true if not a number


#4

small errors but you need semi colons at the end of these.


#5

wait i got it know, i mixed up that isNaN is NOT a number


#6

It worked without those but thanks anyway


#7

NaN means: not a number. So all sorted now?


#8

I was trying to find something to add because you guys had already covered most of it lol. glad you fixed it, have a good day


#9

yep thatd what i mixed up, thought it meant it was a number, once again thanks foryour rescue!


#10

thank you, appreciete it, and good day on you too


#11

not needed, js will ignore the problem with a missing semi-colon. Would it be good practice to add the semi-colons? probably (js in not my area of expertise), but its absolutely not needed


#12