Availability: |
| ||||||||
Property/method value type: | Number primitive | ||||||||
JavaScript syntax: | - | anOperand1 %= anOperand2 | |||||||
Argument list: | anOperand1 | The dividend value where the result is also assigned | |||||||
anOperand2 | The divisor value |
Divide the left operand by the right operand and assign the remainder to the left operand.
This is functionally equivalent to the expression:
anOperand1 = anOperand1 % anOperand2;
Although this is classified as an assignment operator it is really a compound of an assignment and a multiplicative operator.
The associativity is right to left.
Refer to the operator precedence topic for details of execution order.
The new value of anOperand1 is returned as a result of the expression.
The operand to the left of the operator must be an LValue. That is, it should be able to take an assignment and store the value.
Prev | Home | Next |
Remainder (%) | Up | request object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |