Hi everyone, so after having tried different ways to pull the json file of the quotes and nothing seemed to work (keep getting the cross-origin problem, sometimes the request was rejected because the header for origin has the value “null” or something, when I tried using jsonp I encountered the incorrect MIME type error, haven’t tried the work-around that involves passing the origin domain to the “text/javascript” field though) , I came across a post that suggests that this happens because I ran the code from my laptop without having a local server, and running the code from CodePen would work just fine so I went and pasted my code on CodePen. The error stops showing, but still no quotes on the screen and I couldn’t figure out what is missing at the time since the console is blank.
Would appreciate if anyone could look through my code, apologize in advance if the problem was obvious : https://codepen.io/t6huho00/pen/XzwqRe .
Edit: I needed to add ‘&callback=’ to the end of the url in order for it to work. if anyone encounters CORS problems, it could be that you are running the code from your local machine without a server. Try running it from CodePen or Jsfiddle. Have fun coding.