Recall & Review
beginner
What does the
+ operator do in JavaScript when used with numbers?It adds two numbers together to produce their sum.
Click to reveal answer
beginner
What is the result of
10 - 4 in JavaScript?The result is
6, because the - operator subtracts the second number from the first.Click to reveal answer
beginner
How does the
* operator work in JavaScript?It multiplies two numbers and returns the product.
Click to reveal answer
beginner
What does the
/ operator do?It divides the first number by the second number and returns the quotient.
Click to reveal answer
beginner
What is the purpose of the
% operator in JavaScript?It returns the remainder after dividing the first number by the second number, also called the modulus.
Click to reveal answer
What is the result of
7 + 3 * 2 in JavaScript?✗ Incorrect
Multiplication happens before addition, so 3 * 2 = 6, then 7 + 6 = 13.
Which operator gives the remainder of a division?
✗ Incorrect
The
% operator returns the remainder after division.What does
15 / 4 return in JavaScript?✗ Incorrect
JavaScript division returns a floating-point number, so 15 divided by 4 is 3.75.
What is the value of
5 % 2?✗ Incorrect
5 divided by 2 leaves a remainder of 1.
Which operator is used to multiply numbers?
✗ Incorrect
The
* operator multiplies numbers.Explain how the order of operations affects arithmetic expressions in JavaScript.
Think about which operations happen first when you see multiple operators.
You got /3 concepts.
Describe the difference between the division operator
/ and the modulus operator %.One tells you how many times a number fits, the other tells you what's left over.
You got /3 concepts.