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 trialJeff Waite
8,257 PointsFollowing the instructions of Step 4 breaks Step 3, and I'm caught in an infinite loop.
Step 3 asks me to create a variable and set it to my favorite ice cream flavor. Step 4 asks me to change that variable to "Cookie Dough".
With the conditional set, changing this variable breaks step 3, with the following message- "Oops! It looks like Task 3 is no longer passing."
It then makes me fix Task 3, which allows me to go to Task 4, only to break Task 3 again.
I can't get out!
Jeff Waite
8,257 PointsI didn't open the "Ask a question" link in a new tab, so I lost my code.
When I went back and redid the challenge, I passed it. Maybe it was a bug, but I also think I may have mixed case in my variables the first time around. Not sure though.
Either way, it worked this time.
1 Answer
Tomas Smalakys
5,501 PointsHi,
The code is running from top to the bottom. When you create the variable $flavor = "My favorite flavor"; you need to overwrite it by creating another variable with the same name but different string, so it should look something like this
$flavor = "My favorite flavor";
$flavor = "Cookie Dough";
Jeff Waite
8,257 PointsThanks Tomas for your reply. I actually redid the challenge entirely and passed it the next time around. It was either bugged or I had a typo or something I missed the first time.
I would close the question or mark as answered but I don't know how!
Stone Preston
42,016 PointsStone Preston
42,016 Pointscan you post your code