11.4 Unary Operators

2010-05-16

UnaryExpression :
PostfixExpression
delete UnaryExpression
void UnaryExpression
typeof UnaryExpression
++ UnaryExpression
-- UnaryExpression
+ UnaryExpression
- UnaryExpression
~ UnaryExpression
! UnaryExpression

As you can see above there are nine unary operators. Those operators only take one argument. All operators go before their operand (or "argument"), except for ++ and --, which can also serve as postfix operators (but in that case they're still unary). Unary operators do not need the grouping operator (the parenthesis) around their argument, but if you have an argument with whitespace and want to be sure about the order of parsing, you should use the grouping operator for clarification.

Except for the postfix operators, these operators may have LineTerminators between them and their operand. No automatic semi-colon insertion is performed!