Tell us what’s happening:
It says to Use multiple conditional operators in the checkSign function to check if a number is positive, negative or zero. but I’m not very good with them I’ve been stuck on this for nearly an hour trying stuff so I’d apreciate some help.
Your code so far
function checkSign(num) {
return (num === num) ? "positive" : (num > num) ? "negative" : "zero";
}
checkSign(-12);
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
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators