Answers for "ruby increment by in loop"

0

increment in ruby

a = 5
# a++ WRONG: ++ (or --) is not a reserved operator
a += 1 # correct (increment)
a -= 1 # correct (decrement)
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language