If/ else if/ else ReferenceError


Everytime I press save&submit Code an error show`s up in the console saying
ReferenceError: Left side of assignment is not a reference.
Here is my Code:
var isEven = function(number) {
// Your code goes here!
if (number % 2 === 0){
return "true";
else if (isNaN(number)=true){
return "Your input is no number. Please change your input to a number";
else {
return "false";
isEven (4)


return true; (instead of return "true").
same goes to return false.

I think it should work that way


This did`T work.
I deleted the = true in the else if condition and it worked
But thank you for your very fast answer :slight_smile:


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