![]() |
The Remainder Assignment Operator in javascript is represented by “%=”. This operator is used to divide the value of the variable by another operand and assign the remainder to the variable which is the first operand. This can be also explained as assigning the remainder to the first operand which is obtained by dividing the variable from the second operand. Syntax: x %= y or x = x % y Example 1: In this example, we will use the remainder operator. Javascript
Output
1 NaN NaN Example 2: In this example, we will going to see the use of the remainder operator. Javascript
Output
0 NaN We have a complete list of Javascript Assignment Operators, Please check this article Javascript Assignment Operator. Supported Browser:
|
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |