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 trialClancy Boyer
1,346 PointsAuto incrementing Unstable
In the quiz I'm asked to auto increment Unstable. Currently unstable = 25. Then it was reduced by 5 (unstable -= 5) and now I'm being asked to auto increment "unstable," but for the life of me I can't figure it out. Help.
5 Answers
Stone Preston
42,016 Pointsneither of those are the correct use of the postfix ++ operator. the postfix ++ operator goes after the variable name like so:
variableName++;
Stone Preston
42,016 PointsHere is a hint: you need to use the auto incrementing operator which is ++. use the postfix style syntax.
Clancy Boyer
1,346 PointsI thought I did...
Here is what I tried:
unstable = ++
unstable += 1
and neither were successful.
Thanks!
Clancy Boyer
1,346 PointsDo you mean like this:
unstable = 25++
Stone Preston
42,016 Pointsno, to auto increment a variable all you need to do is
variableName++;
you dont need an equal sign, or any specific number values.
Clancy Boyer
1,346 PointsThanks! I finally got it. Sheesh!