2. If / else if / else - Code works but I get no "return"



My code is working but nothing appears at that black screen after "Save & Submit".
What am I doing wrong?

Thanks in advance.

var isEven = function(number) {
  // Your code goes here!
  if (number%2===0){
  return true
  else if(isNaN(number)){
  return "Not a Number"
  return false


You aren't doing anything wrong. You wrote an if statement saying that if it receives this input then run this code and so on. Nothing printed out to the console however because your if statement never received any input from the user.


Ohhh I get it now! Thank you very much.


No problem, I'm glad to help :slight_smile:


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