Navigation Aids -- This Page | Navigation Aids -- This Topic | Navigation Aids -- This Site | ||
---|---|---|---|---|

The unary operators have the following in common:

- They are all covered in section 11.4 of the ECMAScript Language Specification.
- They all have only one operand.
- They all have the same precedence (precedecne of 14 by our scale).
- They all have a right-to-left associativity.

The sub-group names we have provided for the following unary operators is strictly arbitrary and unofficial. The unary operators in section 11.4 (Unary Operators) in the ECMAScript Language Specification collectively have little in common. We have come up with four sub-groups of unary operators. We will address the unary operators in four separate pages each pertaining to a sub-group. The table below will link each unary operator to a sub-group.

Sub Group | Operator | Comment |
---|---|---|

Unary Keyword Group | typeof | Section 11.4 contains three operators that have little in common with other unary operators. We grouped them because they are keywords instead of operator symbols. |

void | ||

delete | ||

Unary Prefix Group | Prefix Increment ( ++ ) |
The prefix increment and decrement operators are contained in section 11.4 and are addressed separately from the two postfix increment and decrement operators in section 11.3. |

Prefix Decrement ( -- ) |
||

Unary Plus and Minus Group | Unary Plus ( + ) |
The unary plus and unary minus operators are contained in section 11.4. |

Unary Minus ( - ) |
||

Unary NOT Group | Bitwise NOT Operator ( ~ ) |
The unary NOT operators are contained in section 11.4. |

Logical NOT Operator ( ! ) |

The above unary operators address the operators in section 11.4 (Unary Operators) in the ECMAScript Language Specification. However, there are other unary operators. You will find them in the links in the following table. Nothing is simple!!

Sub Group | Operator | Comment |
---|---|---|

Postfix Increment and Decrement Group |
Postfix Increment ( ++ ) |
The two postfix increment and decrement operators presented in section 11.3. |

Postfix Decrement ( -- ) |
||

The new Operator | new | The unary new operator is contained in section 11.2.2. The new operator is part of the Left-Hand-Side Expression group for which we have given the group name of "Access Group" |