Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #unary #operator #javascript
ADD COMMENT
Topic
Name
4+1 =