Punctuator (Definition)

Punctuators are composed of special non-alphabetic characters.

Availability:

ECMAScript edition - 2

Punctuators are composed of special non alphabetic characters and are considered to be valid tokens by the interpreter.

Here is a summary of all the valid tokens:

ValueMeaning
!Logical not
!=Not equal to
!==Not exactly equal to (ECMA edition 3)
%Remainder
%=Remainder and assign
&Bitwise AND
&&Logical AND
&=Bitwise AND and assign
(Function argument delimiter and precedence control
)Function argument delimiter and precedence control
*Multiply
*=Multiply and assign
+Unary plus, add, concatenate string
++Postfix and prefix increment
+=Add and assign
,Argument delimiter
-Unary minus, subtract
--Postfix and prefix decrement
-=Subtract and assign
.Property accessor
/Divide
/=Divide and assign
:Part of conditional operator
;Statement terminator
<Less than
<<Bitwise shift left
<<=Bitwise shift left and assign
<=Less than or equal to
=Assign value
==Equal to
===Exactly equal to (ECMA edition 3)
>Greater than
>=Greater than or equal to
>>Bitwise shift right
>>=Bitwise shift right and assign
>>>Bitwise shift right (unsigned)
>>>=Bitwise shift right (unsigned) and assign
?Conditional operator
[Array index delimiter
]Array index delimiter
^Bitwise XOR
^=Bitwise XOR and assign
{Start code block
|Bitwise OR
|=Bitwise OR and assign
||Logical OR
}End code block
~Bitwise NOT

Refer to the items in the see-also list for more details of their functionality.

The [ ], { }, and ( ) punctuators must be used in pairs and must also be nested correctly.

Some punctuator symbols are also used as operators.

See also:Code block delimiter {}, Lexical element, Operator, Operator Precedence, Statement, Token

Cross-references:

ECMA 262 edition 2 - section - 7.6

ECMA 262 edition 3 - section - 7.7