Day 3: Throw
Problem Link
Solution
if (a === 0) {
throw Error("Zero Error");
}
if (a < 0) {
throw Error("Negative Error");
}
return "YES";
Last updated
Was this helpful?
if (a === 0) {
throw Error("Zero Error");
}
if (a < 0) {
throw Error("Negative Error");
}
return "YES";
Last updated
Was this helpful?