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 trialarmand Rodriguez
7,830 PointsQuiz Answer
"Create a for loop that logs the numbers 4 to 156 to the console. To log a value to the console use the console.log( ) method."
I really need help with this and I feel like there's something I'm just not getting. If anyone can lead me in the correct direction that would be amazing!
2 Answers
Steven Parker
231,269 PointsStarting about 5 minutes into the For Loops video, there's an example of how to construct a loop which is very similar to what is needed for this challenge. Instead of creating html, this time you will use the console.log function to log the loop variable. Another difference will be the specific starting and ending values of the loop, but otherwise it will be very similar.
Take another look at the video and give it a try with these hints in mind.
Gonzalo Torres del Fierro
Courses Plus Student 16,751 Pointsfor(var i=4; i<=156; i+=1){ console.log(i); }
armand Rodriguez
7,830 Pointsarmand Rodriguez
7,830 PointsThank you. I figured it out after so much wasted time! Wasn't as hard as I made it out to be for some reason