Javascript examples for Operator:Quiz

Click the following links for the tutorial for Operator and Quiz.

- Display the sum of 1 + 5, using two variables x and y with the addition operator (+).
- Display the difference of 1 - 5, using two variables x and y.
- Display the product of 10 * 50, using two variables x and y.
- Display the result of 50 / 5, using two variables x and y.
- Find the remainder when 15 is divided by 9, using two variables x / y and the modulus operator %
- Use the += operator to add a value of 5 to the variable x.
- Use the -= operator to subtract a value of 5 from the variable x.
- Use the *= operator to multiply the variable x with 5.
- Use the /= operator to divide the variable x with 5.
- Use the %= operator to assign a remainder of 10 / 3 to the variable x.
- Choose the correct comparison operator to display "true", when: 5 is less than 7.
- Choose the correct comparison operator to display "true", when: 10 is greater than 7.
- Choose the correct comparison operator to display "true", when: 10 is equal to 10.
- Choose the correct comparison operator to display "true", when: 10 is NOT equal to 8.
- Use a conditional (ternary) operator to compare age
- Use a conditional (ternary) operator to compare string values