Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

increment in ruby

a = 5
# a++ WRONG: ++ (or --) is not a reserved operator
a += 1 # correct (increment)
a -= 1 # correct (decrement)
 
PREVIOUS NEXT
Tagged: #increment #ruby
ADD COMMENT
Topic
Name
3+2 =