Nearby lessons

12 of 40

🔹 Unary Operators

📌 What are Unary Operators?

Operators that work on a single operand.

Includes type checking and property deletion.

AttributeDescription
typeofReturns variable type
deleteDeletes object property
voidEvaluates expression without return
+Converts to number
-Negates number
Code Example
PREVIEW READY
Loading Editor...
Live Preview
Keep Going!JS - Ternary Operator