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 trialAshkan Entezari
3,956 PointsMy code is not passing the challenge! Need help
It seems to be a simple question, I can't find the problem in my code! Can anyone help me please?
for (var i=0; i<temperatures.lenght; i++)
console.log(temperatures[i]);
2 Answers
Scott Montgomery
23,242 Pointsah, you switched up the last two letters in .length
Scott Montgomery
23,242 PointsCan you post the code you are trying?
the for loop should look something like this
for ( i=0; i < temperatures.length; i++ ){
console.log(temperatures[i]);
}
Ashkan Entezari
3,956 PointsSorry I thought my code will be automatically attached! I updated the post with my code, it's the same thing but it won't work!!
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsI hate spelling errors like that. Sometimes I will stare at the code for hours trying to figure out what I did wrong... and it was something as simple as that. :)
Ashkan Entezari
3,956 PointsAshkan Entezari
3,956 PointsAhhh.. thanks for finding this!