Overview

suggest change

Unary operators take one operand. JavaScript does not let user code override them.

The following unary operators are available:

Operator Operation Example
delete Deletes a property from an object. It does not delete a variable. delete obj.key
void Evaluates its operand and yields undefined. void 0
typeof Returns a string naming the type of a value. typeof null is "object". typeof value
+ Converts its operand to a Number. +"12"
- Converts its operand to a Number, then negates it. -n
~ Bitwise NOT after ToInt32. ~n is -(ToInt32(n) + 1). ~3
! Logical NOT. !value

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents