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 trialAmangali Muldashov
Full Stack JavaScript Techdegree Student 1,890 PointsCan't figure out what's wrong with my code
the code works in the JS console showing numbers from 5 to 100.
for (let i = 5; i <= 100; i++) {
console.log(`${i}`);
}
1 Answer
Olajide Fagbuji
6,154 PointsYour code is fine, but the test seems to expect a numeric value. the interpolation converts the logged output to string. so replace the ${i}
with i and the test should pass.
Amangali Muldashov
Full Stack JavaScript Techdegree Student 1,890 PointsAmangali Muldashov
Full Stack JavaScript Techdegree Student 1,890 PointsThanks a lot Olajide Fagbuji, it worked))) Appreciate your help!