Why is this returning false

Why is this returning false
0.0 0

#1

Your code so far

function welcomeToBooleans(num) {
if (num > 1) {
  return true;
} else {
 return false;
  }
}
welcomeToBooleans(3);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36.

Link to the challenge:


#2

Your code only returns true if it receives an argument which is greater than one. The tests do not pass an argument to welcomeToBooleans so your code returns false.


#3

but i did pass

function welcomeToBooleans(num) {
if (num > 1) {
  return true;
} else {
 return false;
  }
}
welcomeToBooleans(3);

#4

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#5

If you look at the tests, they are calling welcomeToBooleans() with no arguments.


#6

How do I check the tests mate?


#7

They are right under the challenge description. They have X or ✓ next to them.


#8

Sorted… thanks…

sometimes its hard to get what the tasks are asking for maybe its because english is a 2nd language