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 trial4 Answers
eck
43,038 PointsYou are only adding 1 to x
, while the question is expecting x
to increase by 2.
Steven Parker
231,275 PointsIf you use a literal in the log statement, it will always log the same thing (in this case every line will have "#1").
Also, you may need a different increment value if you don't want all adjacent numbers. (1,2,3,4,5 ... etc.)
Morgan Walstrom
4,683 PointsI figured it out! But thanks for the response guys!
Simon walters
Courses Plus Student 8,962 PointsHey Guys
I am stuck on this question also, I have re-watched the videos numerous amount of times and I can't seem to get my head around this particular question, I have answered 4 out of the 5 questions correctly which allows me to move on to the next part of the course. I would still like to know why I wasn't getting this question, can someone please share with me how they approached this?
Thanks
Simon
Steven Parker
231,275 PointsSince this question has already been answered, start a new one and show your code in it. If you use the "get help" button in the challenge, it should include and format your code for you.
Morgan Walstrom
4,683 PointsMorgan Walstrom
4,683 PointsFinish the code in this do/while loop, so that the following lines are output to the console:
1
3
5
7
9
11
13
15
var x = 1; do { console.log('#' + 1); x += 1; } while ( x <= 15 )