Share via


Operator Summary

The following tables list JScript operators. Each name in the description column links to a corresponding topic that explains the proper syntax and use.

Computational Operators

Description

Symbol

Addition

+

Decrement

--

Division

/

Increment

++

Modulus arithmetic

%

Multiplication

*

Subtraction

-

Unary negation

-

All computational operators perform calculations with numeric data. The addition operator also performs string concatenation when either operand is a string.

Logical Operators

Description

Symbol

Equality

==

Greater than or equal to

>=

Greater than

>

Identity

===

In

in

Inequality

!=

Less than or equal to

<=

Less than

<

Logical AND

&&

Logical NOT

!

Logical Or

||

Non-identity

!==

A logical operator returns a Boolean value. Depending on the operator, the value may represent the result of the comparison, test, or combination.

Bitwise Operators

Description

Symbol

Bitwise AND

&

Bitwise Left Shift

<<

Bitwise NOT

~

Bitwise Or

|

Bitwise Right Shift

>>

Bitwise XOR

^

Unsigned Right Shift

>>>

Bitwise operators operate on the binary representation of the operands. If operands are not compatible with each other, they will be coerced to the appropriate type. For more information, see Coercion By Bitwise Operators.

Assignment Operators

Description

Symbol

Assignment

=

Compound Addition Assignment

+=

Compound Bitwise AND Assignment

&=

Compound Bitwise Or Assignment

|=

Compound Bitwise XOR Assignment

^=

Compound Division Assignment

/=

Compound Left Shift Assignment

<<=

Compound Modulus Assignment

%=

Compound Multiplication Assignment

*=

Compound Right Shift Assignment

>>=

Compound Subtraction Assignment

-=

Compound Unsigned Right Shift Assignment

>>>=

All assignment operators return the value that is assigned to the left operand.

Miscellaneous Operators

Description

Symbol

Comma

,

Conditional (Ternary)

?:

Delete

delete

Instanceof

instanceof

New

new

Typeof

typeof

Void

void

See Also

Concepts

Operator Precedence

Other Resources

JScript Operators