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 trialMichael LaCroix
5,828 PointsNo idea what quiz answer is
I've been stumbling over past videos and throwing things in for 15 mins and still don't have the slightest clue what the answer is supposed to be.
I feel like I've never even seen something like this before. I know it's a while loop, but I've never seen one that looks like this, have I?
1 Answer
qlpxjevhuv
10,503 PointsYou'll want the while loop to check that the remaining tries is greater than zero and not dunked.
while (remainingSlices > 0 && !pizza.isGone()) {
eatPizza();
}
If you recall, the > means greater than, && means AND, and ! means not.