Complete the isPositive function. It has one integer parameter, a
.
If the value of a
is positive, it must return the string YES.
Otherwise, it must throw an Error according to the following rules:
- if
a
is0
, throw an Error with message = Zero Error - if
a
is negative, throw an Error with message = Negative Error
1 <= n <= 5
-100 = a <= 100
3
-6
0
8
YES
Negative Error
Zero Error
YES