JavaScript Unary Operators Overview

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


Unary operators are operators with only one operand. Unary operators are more efficient than standard JavaScript function calls. Additionally, unary operators can not be overridden and therefore their functionality is guaranteed.

The following unary operators are available:

deleteThe delete operator deletes a property from an object.example
voidThe void operator discards an expression's return value.example
typeofThe typeof operator determines the type of a given object.example
+The unary plus operator converts its operand to Number type.example
-The unary negation operator converts its operand to Number, then negates it.example
~Bitwise NOT operator.example
!Logical NOT operator.example

Got any JavaScript Question?