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 trialSusan Rusie
10,671 PointsWhy is this not passing task 2 the code challenge for the Open Weather Map API?
The question is this: To use the Open Weather Map API, you need to specify a city name or state and state or country. Add a property to the data object. The name of the property should be "q" and the value should be a string with the name of a city, followed by a comma, and a state or country name. For example: q : "Portland, OR". I am not sure what they are looking for. Any help on this would be greatly appreciated. Here is my code:
$(document).ready(function(){
var weatherAPI = 'http://api.openweathermap.org/data/2.5/weather';
var data = {
q : "Portland, OR",
};
};
1 Answer
Simon Coates
28,694 Pointsare you missing a ) ?
$(document).ready(function(){
var weatherAPI = 'http://api.openweathermap.org/data/2.5/weather';
var data = {
q : "Portland, OR",
};
});
Susan Rusie
10,671 PointsSusan Rusie
10,671 PointsThat was it. Thank you for your help.