unary in javascript code example
Example: unary operator javascript
+a // Converts to number
-a // Converts to number and negates
++a // Adds 1 to a and returns new a
a++ // Adds 1 to a and returns original a
--a // Subtracts 1 from a and returns new a
a-- // Subtracts 1 from a and returns original a