I am trying to start the random quote generator and for what ever reason no matter what i try i cant seem to actually pull in data from an outside site. My code is listed below but please don’t just fix it, just point me in the right direction unless the problem is really obscure.
So, I see a few issues here:
Your CodePen is throwing an error on line 4, with
It looks like you’re trying to access value for the
quoteproperty…except the way it’s structured now, in the callback function, you’re trying to pull something off of this magical
JSON(capital is important in this case) object. Where is this object? (This is kind of trick question.) And what does the callback function of .getJSON take as an argument? (This is not at all a trick question.)
Is there a particular reason you’re calling
json? (In the long run, this is much less important than #2. But always a good practice to ask yourself why you’re doing everything you’re doing!)