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 trial

JavaScript JavaScript Loops Simplify Repetitive Tasks with Loops Review while, do...while, and Loop Conditions

Jelena Feliciano
seal-mask
.a{fill-rule:evenodd;}techdegree
Jelena Feliciano
Full Stack JavaScript Techdegree Student 12,729 Points

This answer doesn't work here but it works on the MDN. not sure what we're looking for here

let i = 1; do { console.log( #${0 + i} ); i += 2; } while ( i <= 15 )

not sure how else write this to get the numbers in the console to be #1, #3, #5, #7, #9, #11, #13, #15. MDN shows that this works so what is treehouse looking for.

1 Answer

Steven Parker
Steven Parker
229,786 Points

While "0 + i" might technically work (since adding 0 to any value doesn't change it), it's most likely confusing the answer checker which probably expects a single term there and not a math expression.

Try using just plain "i" for that blank instead.