IMPORTANT!! Topics!! Using if or else-if statement with funcation() in JavaScript argument
function multiply(a,b) {
if(a > 10 || b > 10) {
return "that's too hard";
} else {
return a * b;
}
}
multiply(5,10);
50
Or,
function multiply(a,b) {
if(a > 10 || b > 10) {
return "that's too hard";
} else {
return a * b;
}
}
multiply(5,110);
"that's too hard"
Comments
Post a Comment