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 trialLeo Marco Corpuz
18,975 PointsQuestion about jQuery $.getJSON method on the earlier code challenge about weather
So it says that the url, data, and callback functions are set and it looks like I just need to pass them as arguments to $.getJSON(). I did that and I get an error saying I didn't use the method correctly and that I needed to pass the url, data, and callback function in that order.
1 Answer
Leo Marco Corpuz
18,975 PointsIt turns out that the first two arguments are right. You can just use their variables as arguments. But for the function, I just had to put the name of the function, not the entire thing. Thanks.
Saqib Ishfaq
13,912 PointsSaqib Ishfaq
13,912 PointsLeo Marco Corpuz can you share your code! my raandom guess would be try, passing the function itself like this>>> into the $.getJSON(url, data, function(){})