Java script help
Go to solution
Solved by Mr_KoKa,
var isEven = function(number) { if(number % 2 === 0){ return true } else if (isNaN(isEven)){ return "This ain't a numbah" // This return probably evaluates to true as after you check if number % 2 === 0, if is not then you check isNaN(isEven) and in fact // isEven is not a number, it is a function, you probably meant to check isNaN(number), but even though, I would check it // before I do any number operations on variable. } else{ return false } };

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now