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 trialKaya loves watermelon
12,717 PointsComplete this code by including the shorthand operator that increases the value assigned to counter by one each time....
let counter = 0;
do {
console.log(i love javascript);
counter_;
} while ( counter <= 9) {
2 Answers
Travis Alstrand
Treehouse Project ReviewerHey Syra Syra !
Next time, please post some context, or a question as you've just posted the code from the quiz here. I assume you're stuck though so this should help you out
It's asking us to increment counter
by one each time it loops. This could be done with the +=
operator, like
counter += 1;
But this question is specifically asking for the shorthand operator.
The answer can be found a few steps before this quiz here, Add One To A Number
Kaya loves watermelon
12,717 PointsThanks! it worked I'm so grateful.
Travis Alstrand
Treehouse Project ReviewerOh good! I'm glad it worked out!! You're very welcome!