+ 1
Ruby shorthand
i donât really get += because a = 1 b = 2 a +=b So in my head it goes 1 = 1+2 I donât get this. Help
3 Answers
+ 6
Would be more like a = a+b or you could write it a = 1+2, which now changes the value of a to 3 for any future references until changed again. I hope that helps.
+ 6
Cheers m8
+ 1
thanks