Calculations

Report a typo

Calculate the following. Enter the correct answer in the field.

let a = 30;
let b = 6;
let c;

if (a < 100 && b < 10) {
    c = a * b;
} else if (a < 50 && b < 6) {
    c = a - b;
} else {
   c = a + b;
}

console.log(c);
Enter a number
___

Create a free account to access the full topic