Basic JavaScript operators

+   -   *   /   %   ++   --
   Note: a%b gives the remainder of a divided by b.
   Note: ++i returns the value of i after the increment by 1.
   i++ returns the value of i before the increment by 1.


==   !=   >   >=   <   <=


&&   ||   !


=   +=   -=   *=   /=
   Note: += performs the operation, then assign it.
         same for other similar operators.


&=   |=


expr1 ? expr1 : expr2
    Note: If expr1 is True, then return expr1, else expr2.


typeof
    Note: e.g. if (typeof n=="number") {...}

References: http://msdn2.microsoft.com/en-us/library/6hsc0eak.aspx


See also:


Page created: 2005-05.
© 2005 by Xah Lee.
Xah Signet