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 trialCarol Holmes
1,626 PointsShould I use && in the answer? If not, why? And am I close?
How do I represent limits? I tried .... count >=4; count<=156; but it wouldn't run? The && was another way I tried.
for(var count = 4; count >= 4 && <= 156; count += 1 ){
console.log(count);
}
2 Answers
Robert Richey
Courses Plus Student 16,352 PointsHi Carol,
You're code is really close to working. Each time you do a comparison, there needs to be a variable (or literal value) on the left and a variable (or literal value) with which to compare on the right.
// change this
for(var count = 4; count >= 4 && <= 156; count += 1 )
// to this
for(var count = 4; count >= 4 && count <= 156; count += 1 )
Cheers
Carol Holmes
1,626 PointsTHANK YOU!
Carol Holmes
1,626 PointsCarol Holmes
1,626 Pointsfor(var count = 0; count >= 4; count <= 156; count +=1;){ console.log(count); }