Picture of Michael Lee
:wave: Hey hey, I'm @michaelsoolee! I'm a dad and maker of digital and software products.

Ruby doesn't have an increment operator

Written on October 19, 2015

Coming from JavaScript, I had no idea that Ruby doesn’t have an increment operator like ++. It turns out that the author of Ruby, matz suggests the official way to increment and decrement variables in ruby is by using the += and -= operators.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet for free.
Git cheat sheet preview image
Previous post: Over 3