please dont rip this site
Microsoft® JScript
Operator Summary
Tutorial |

JScript has a full range of operators, including arithmetic, logical, bitwise, and assignment operators.

Computational Logical Bitwise Assignment
Description Symbol Description Symbol Description Symbol Description Symbol
Unary negation - Logical NOT ! Bitwise NOT ~ Assignment =
Increment ++ Less than < Bitwise Shift Left << Compound Assignment OP=
Decrement -- Greater than > Bitwise Shift Right >>    
Multiplication * Less than or equal to <= Unsigned Shift Right >>>    
Division / Greater than or equal to >= Bitwise AND &    
Modulo arithmetic % Equality == Bitwise XOR ^    
Addition + Inequality != Bitwise OR |    
Subtraction - Logical AND &&        
    Logical OR ||        
    Conditional (trinary) ?:        
    Comma ,        

Operator Precedence

Operators in JScript are evaluated in a particular order. This order is known as the operator precedence. The following table lists the operators in highest to lowest precedence order. Operators in the same row are evaluated in a left to right fashion.

. [] ()field access, array indexing, and function calls
++ -- - ~ ! typeof new voidunary operators, return data type, object creation, undefined values
* / %multiplication, division, modulo division
+ - +addition, subtraction, string concatenation
<< >> >>>bit shifting
< <= > >=less than, less than or equal, greater than, greater than or equal
== !=equality, inequality
&bitwise AND
^bitwise XOR
|bitwise OR
&&logical AND
||logical OR
= OP=assignment, assignment with operation
,multiple evaluation

Parentheses are used to alter the order of evaluation. The expression within the parentheses is fully evaluated before its value is used in the remainder of the statement.

An operator with higher precedence is evaluated before one with lower precedence. For example:

z = 78 * (96 + 3 + 45)

There are five operators in this expression: =, *, (), +, and +. According to precedence, they are evaluated in the following order: (), *, +, +, =. So, the sequence of evaluation goes as follows:

  1. Evaluate the expression within the ().
    1. There are two operators here, but they have the same precedence. So 96 and 3 are added and 45 added to that total, resulting in a value of 144.
  2. Multiplication is next, so 78 and 144 are multiplied, resulting in a value of 10998.
  3. Assignment is last, so 11232 is assigned into z.

© 1996 by Microsoft Corporation

file: /Techref/language/asp/js/308.htm, 10KB, , updated: 1996/11/22 11:12, local time: 2024/5/23 05:04,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> Operators - Microsoft&#174; JScript</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!