This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Lists and Functions Forum

View Course » View Exercise

142 points
2c3a3b50cd86df17c61629b4a18f4b49?s=140&d=retro
Submitted by
Skallemann
almost 3 years ago

What does the symbol += mean?

I can't remember that we learnt this symbol. Is there any other symbols related to this, like *= or -=?


7 votes

permalink

x += 10
means: x = x + 10

298 points
2ca5ed4cc878d554f2bd7907b578ab63?s=140&d=retro
Submitted by
黄然
almost 3 years ago


4 votes

permalink

Thank you! Does x -= 10 mean x = x-10?

142 points
2c3a3b50cd86df17c61629b4a18f4b49?s=140&d=retro
Submitted by
Skallemann
almost 3 years ago

2 Comments

76a0081cb8dd1143dc65a3567212547f?s=140&d=retro kremer5 almost 3 years ago

yes

5aa3aff918c5180a005a04c629ec9ff0?s=140&d=retro flamindutts almost 3 years ago

Does it matter which way around you do the += / =+? What is expected to happen when you do =+?


-7 votes

permalink

Golly gee wizz, thanks mr!

163 points
546b7a4352f863f7c60034fa_825401211
Submitted by
WillMcoolness
almost 3 years ago