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 trialKevin Leong
1,664 PointsQuiz JavaScript Loops
Quiz Question 1 of 6 Please fill in the correct answer in each blank provided below.
Fill in the blank(s) below:
Complete this code by including the shorthand operator that increases the value assigned to counter by one each time through the loop:
let counter = 0; do { console.log('I love JavaScript!'); counter _______ ; } while ( counter <= 9)
I thought the blank should be += 1 but it keeps on telling me that it is incorrect. Why?
2 Answers
Cameron Childres
11,820 PointsI think the question is looking for a specific shorthand operator, not an operator combined with a value. Try the increment operator "++".
michael mitchell
5,280 Pointshelp I have to show how I used the code in my portfolio but Idek the code. SOS anyone have pics? send code pics? please?
michael mitchell
5,280 Pointsmichael mitchell
5,280 Pointsyou're wrong
jb30
44,807 Pointsjb30
44,807 PointsThe question accepts
++
without the quotes.