Why do I get it a false for my code?


#1

What am I doing wrong? I keep getting “flase”

my code -

function isGreaterThan(numberOne,numberTwo)
{if (numberOne>numberTwo) {
return true;
} else {
return false;
} }
isGreaterThan(6, 2);
console.log(isGreaterThan())


#2

here:

isGreaterThan(6, 2);
console.log(isGreaterThan())

why call the function twice? once correctly with two arguments (6 and 2) and once incorrect (no arguments, even though the function has two parameters)


#3

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