https://www.digitalocean.com/community/tutorials/javascript-unary-operators-simple-and-useful

OperatorExplanation
Unary plus (+)Tries to convert the operand into a number
Unary negation (-)Tries to convert the operand into a number and negates after
Increment (++)Adds one to its operand
Decrement (--)Decrements by one from its operand
Logical NOT (!)Converts to boolean value then negates it
Bitwise NOT (~)Inverts all the bits in the operand and returns a number
typeofReturns a string which is the type of the operand
deleteDeletes specific index of an array or specific property of an object
voidDiscards a return value of an expression.

0 commenti

Lascia un commento

Segnaposto per l'avatar