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 trialBen Myhre
28,726 PointsHeads up that the modern variable declaration statements (let, const) throw errors in this in the challenges.
const just said I can't do that. let threw a parsing error.
2 Answers
Adam Beer
11,314 PointsYou should always use 'var' to create a variable. For example: var weatherAPI;. I think your code is good just please delete the equal to symbol.
Ben Myhre
28,726 PointsYou should always use 'var' to create a variable
That is not true. 'Let' is a perfectly valid way to declare a variable. In fact, it is more often viewed as the preferred method to declare a variable. Some even say that var should not be used anymore. Const could be considered a constant and not a variable, but in other courses here, const has been referred to as a variable, so I was going with it.
Adam Beer
11,314 PointsYou're right. I was not understandable. I meant that in this challenge "You should always use 'var' to create a variable". I was thinking about here the 'var' keyword.