I am not sure how to use API with JSON. I’ve looked back at the previous exercises and I am still kind of lost.
I understand how to use the “on click” event function, I am pretty sure I know how to declare a string var and just += to it. I also found a free quote API, but I have no idea how to access it.
Hello – you can also generate your own quote object directly in your app, and randomly access quotes from there, if you want to build something you’re more personally invested in and avoid the hassle of dealing with an API (until the weather app ).
Otherwise you could use the jQuery ajax method. So onclick, you’d run the ajax method that takes your API url as an arg, and display something based on success or failure of that request.