unary operator

+, -, ~, ~, delete, void, typeof

JSstatementexpressionoperator ⟩ unary

(operator) an operation with only 1 operand. 👉 table of operators

  • delete - delete object property.

  • void - discards an expression's return value.

  • typeof - determines the type of a value.

  • + - unary plus operator converts its operand to Number type.

  • - - unary negation operator converts its operand to Number type and then negates it.

  • ~ - bitwise NOT operator.

  • ! - logical NOT operator.

Last updated