Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Miguel Nunez3,266 Points
Add 5 to $integerOne. Subtract 1 from $integerTwo.
//Place your code below this comment $integerOne = 1; $integerTwo = 2;
Daniel Gauthier14,999 Points
The challenge is looking for the following code:
<?php //Place your code below this comment $integerOne = 1; $integerTwo = 2; $integerOne += 5; $integerTwo -= 1; ?>
The challenge basically wants to see you use those += and -= operators, while also showing you know the difference between initializing a variable (first step) and manipulating them (second step).
Good luck with the course!
The Longer way xD
<?php //Place your code below this comment $integerOne=1; $integerTwo=2; $floatOne=1.5; $integerOne=($integerOne + 5); $integerTwo=($integerTwo - 1); ?>
Took me some time to understand, but also found out this post. never thought of using the += or -= operators and also the question was bit confusing, but somehow this worked, thereafter i just wanted to see if there was any other answer, thanks to this post i found a shorter way to complete the same question.
Adios Daniel Gauthier thanks man..thanks alot xD
Greg Sargent3,812 Points
Wow I would never have thought to use those operators. Thanks for sharing!
Thank you! I wouldn't have figured out to use those operators either