Oops, try again. Make sure your if/else if/else statement returns a string when the function input isn't a number


#1

var isEven = function(number) {
if(number %2 === 0 ){
    return true;
}
else if (isNaN(number)) {
    return"Is not a number";}
else {
    return false; 
};
};
isEven("cats");

#2

Seems to be ok did you try to refresh the page?


#3

@yamese4,
Insert a space between the return and your string...
Try a reset of your Browser.

And as note:
As you are using a return statement
you will get a return Value with NOdisplay.
So use

console.log( isEven("stuff") );
console.log( isEven(3) );
console.log( isEven(4) );

++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#4

the second last curly brace closing should not have the semicolon after it
Also declare 'isNan' a boolean that is true before the function starts at line 1