solution logic fixed for negative numbers (#36093)

This commit is contained in:
Rajat Verma
2019-05-20 21:01:10 +05:30
committed by Randell Dawson
parent b55c50c6cf
commit 53fd5d8c14

View File

@ -19,7 +19,7 @@ Heres a full solution:
```javascript ```javascript
function checkSign(num) { function checkSign(num) {
return (num > 0) ? "positive" : (num < -12) ? "negative" : "zero"; return (num > 0) ? "positive" : (num < 0) ? "negative" : "zero";
} }
checkSign(10); checkSign(10);
``` ```