… check if num2 is zero. If it is, the function should return the string "Error: Division by zero" . Otherwise, it should return the result of dividing num1 by num2 .
No I wasn’t asked to log anything oddly enough I was sure that is what it was asking me, I may try an additional console.log outside the block to error check. However I’m doing something wrong and am unsure what.
function calculateQuotient(num1, num2) {
if (num2 === 0){
return "Error: Division by zero";
}else{
return num1 / num2;
}
yeah I feel it should have worked too, yet I feel something entirely small is impeding my progress as a simple extra space has completely broken my entire code before on here before.