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 trialCharles Harpke
33,986 PointsYou can get the temperature back from the Open Weather Map API in metric (Celsius) or imperial (Farenheit) units. Add an
What have I left out in the following code? I can't get this to pass:
$(document).ready(function() {
var weatherAPI = 'http://api.openweathermap.org/data/2.5/weather';
var data = {
q: "Portland,OR"
units : "metric"
};
});
3 Answers
Chris Shaw
26,676 PointsHi Charles,
You're simply missing the comma after "Portland,OR"
, put that in and your code will pass.
var data = {
q: "Portland,OR", // <--- comma here
units : "metric"
};
Charles Harpke
33,986 PointsArgh...Thank you!
Laura Rodriguez
8,284 Points$(document).ready(function() { var weatherAPI = 'http://api.openweathermap.org/data/2.5/weather'; var data = {q : "Portland,OR", units :"metric", data:”imperial"}; });