first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

JavaScript: “JavaScript OPERATORS: = (Assignment Operators)”; DevGuru.com

OPERATORS: = The basic assignment operator is the equal sign, which assigns the value (literal or variable) on its right to the variable on its left:

Code: x = a;

The assignment operator can also be combined with a variety of other operators to provide shorthand versions of standard operations. It combines with the arithmetic operators +, -, *, / and % to give the following shorthand versions:

a += b instead of a = a + b a -= b instead of a = a - b a *= b instead of a = a * b a /= b instead of a = a / b a %= b instead of a = a % b

It also combines with the following bitwise operators:

a <<= b instead of a = a << b a >>= b instead of a = a >> b a >>>= b instead of a = a >>> b a &= b instead of a = a & b a ^= b instead of a = a ^ b a |= b instead of a = a | b

[http://www.devguru.com/Technologies/Ecmascript/Quickref/assignment_operators.html]

mod date: 2010-03-02T22:44:36.000Z