Basic JavaScript - Use Multiple Conditional (Ternary) Operators

Tell us what’s happening:
Describe your issue in detail here.
All It’s good but the exercise doesn’t check like done.
Your code so far

function checkSign(num) {
return (num > 0) ? "Positive" : (num < 0) ? "Negative" :  "Zero"


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Basic JavaScript - Use Multiple Conditional (Ternary) Operators

Link to the challenge:

Hello and welcome to the forum!

Your console should return this error:

// running tests
should return the string
Note that capitalization matters

Your function is fine. The strings which it returns are not.

Check again your return string. “Positive” is not same string as “positive”.
Hope that will help you.


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