Tell us what’s happening:
The output of checkEqual(1, -1) should be false.
But when i test this in browser console, it’s true.
I dont get this point, i need help
Your code so far
function checkEqual(a, b) {
return a>=b ? true : false;
}
checkEqual(1, -1);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.
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.
here if you post full solution some" smart" guys will tell that you cannot post full solution he just wrapped in in “”
//solution
function checkEqual(a, b) {
return a == b ? true : false;
}