Tell us what’s happening:
checkSign should use multiple conditional operators
how to explan it?
I’m just use if /else if, why can’t work?
Your code so far
function checkSign(num) {
if(num > 0) {
return "positive";
} else if(num < 0) {
return "negative";
} else if(num === 0) {
return "zero";
}
}
checkSign(10);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators