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 trialGabriel E
8,916 PointsWhere to start on this challenge?
Hi there, I've been away on break for a few days, and when I got back, the information I learned sort of temporarily slipped from my mind! xD! Would someone here have a helpful hint to help me get back on track with this challenge? Thanks in advance!
2 Answers
Steven Parker
231,236 PointsInstead of jumping back in on the challenge, why not review the last video as a warm up? Looks like you last saw For Loops, which should contain most of what you need to solve this challenge.
Gianmarco Mazzoran
22,076 PointsHi Gabriel D, to run a for loop in javascript you have initially to open the for loop
for () {
}
then you have to pass a parameter that start to count from 4 till 156. Generally you use a variable called $i and check if the variable correspond to 156, if not add 1 to the variable $i like this:
for ($i=4; $i<=156; $i++) {
}
then you have to print out the $i variable with the console.log() method.
for ($i=4; $i<=156; $i++) {
console.log($i)
}
Gabriel E
8,916 PointsGabriel E
8,916 PointsOk, I'll do that. Thanks!