Function returns false when number = 3


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
Control Flow If/ else

<In what way does your code behave incorrectly? Include ALL error messages.>
I get an error that the function returns false when number = 3, I tried switching the true and false conditions to test and get the same error?

```

var vNum = prompt("Pick a number: ");

var isEven = function(number) {
// Your code goes here!
if(vNum%2 === 0){
return true;
}else{
return false;
}

};

isEven(vNum);

<do not remove the three backticks above>

#2

Hi here

if(vNum%2 === 0)

You should not put vNum but number since it is the argument of your function isEven.


#3

I thought when I called the function and passed it vNum that was correct? Also it says ‘number is not defined’ so I’m unsure as to where to go from here, thanks for your reply, maybe this is a good time to do some of that “research” stuff I’ve been hearing good things about :wink:

EDIT - Nevermind, it helps if I spell “number” correctly. Thanks Wizmarco!