If/else if/if more on control flows


var isEven = function(number) {
// Your code goes here!

if(number%2===0) {
return true;

else if(isNaN(number)===true){
return "input isn't a number";
return "false"

may i know what is the mistake in above code its showing your code returns true fo r3!



return "false"

you return a strings, strings are considered true, you should return a boolean value instead


oh thank u i got it
my mistake


It would be a miracle if you didn't make mistakes :wink:

That is why we have to forum, so you can get help to learn from your mistakes and become a better programmer :slight_smile:


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