Need help with quotesondesign API using vanilla JS

I think I understand DOM manipulation, json, ajax etc.

But now I’ve started to actually build the quote machine, I’m not sure where I’m going wrong using the API and how I can find out how to use any API i find properly.

Below is my codepen for the project.

Here is the page about the API but using only jQuery.


Basically works now.

But I still have questions.

Is there any other solution to CORS error?

Is there any other solution for the randomising quote without using the random “hack”?