Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![mohan Abdul](https://secure.gravatar.com/avatar/c2d82f960291404a11c9a865db4a0a92?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
mohan Abdul
Courses Plus Student 1,453 Pointsreassigning the variable? the teacher reassigned the variable three times. when reassigning the old variable, do you typ
do you type the previous label?
eg. """dessert = ' choc & candy' dessert = dessert + ' ben & jerries' dessert += yum' dessert += ' !' * 20""" so each time i want to change the variable or make addition I type/input the previous label? i am I correct in that? how do i make a further addition to the variable?
3 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsA normal assignment ("=
") replaces the contents of a variable. It creates a new variable if one doesn't exist.
A concatenating assignment ("+=
") adds on to what's already there. This form can only be used on variables that have already been created.
![mohan Abdul](https://secure.gravatar.com/avatar/c2d82f960291404a11c9a865db4a0a92?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
mohan Abdul
Courses Plus Student 1,453 PointsSteven Parker, thanks for the speedy response its cleared up a few long standing questions, there is one thing thats nagging me from your response though. Top line """var sample""" should i ignore the "var" as the rest of the labels are just """sample""". once again thank you.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsSorry, I got confused for a moment after answering a question about a different language. I've revised my answer.
![Tyrone Roberts](https://uploads.teamtreehouse.com/production/profile-photos/11670727/micro_61802917_2846709388688766_1954681732858904576_n.jpg)
Tyrone Roberts
1,182 PointsSteven Parker your answer answers a lot of the questions being asked on the forum about this reassigning process.
Thank you!
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsIt's nice to know the old answers are still helping folks. Happy coding!
mohan Abdul
Courses Plus Student 1,453 Pointsmohan Abdul
Courses Plus Student 1,453 PointsSteven Parker , so there is no way to delete a variable? or you can only change it? In the video teacher only made additions, how do you completly change an already existing variable so its completly different instead of making additions? please code examples if you can. thanks?
Steven Parker
230,688 PointsSteven Parker
230,688 Points