https://www.digitalocean.com/community/tutorials/javascript-unary-operators-simple-and-useful
Operator | Explanation |
---|---|
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 |
typeof | Returns a string which is the type of the operand |
delete | Deletes specific index of an array or specific property of an object |
void | Discards a return value of an expression. |
0 commenti