Which arithmetic operator is used to calculate the remainder in JavaScript?
- % (Modulus)
- / (Division)
- * (Multiplication)
- + (Addition)
In JavaScript, the % (Modulus) operator is used to calculate the remainder of a division operation. For example, 7 % 3 equals 1 because when 7 is divided by 3, the remainder is 1.
Loading...
Related Quiz
- What is the primary difference between for...in and for...of loops?
- How does JavaScript implement inheritance internally?
- You are reviewing a junior developer's code and see the following line var x = 10;. You want to advise them to use a declaration that maintains block scope, which keyword should they use instead of var?
- Which early browser first implemented JavaScript?
- The initial version of JavaScript was created in just _________ days.