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!
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
Miguel Nunez3,266 Points
Add 5 to $integerOne. Subtract 1 from $integerTwo.
//Place your code below this comment $integerOne = 1; $integerTwo = 2;
Daniel Gauthier15,000 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,942 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