+ 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 odpowiedzi
+ 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