I am fairly new to working with APIs in Javascript and I am working on a quiz app project that makes use of a quiz question generator API. I have figured out how to display the API response in the console to view the Javascript object? string? (I have used typeof on the response which tells me it is a string), and now I am trying to figure out how to extrapolate information such as questions, correct answer, and incorrect answer(also an array) from the value for result that seems to be an array of objects. Any help regarding this issue would be greatly appreciated!
var request = new XMLHttpRequest();
request.open('Get', 'MyAPIKey', true);
request.onload = function() {
console.log(request.status);
console.log(request.response);
};
Blockquote
Blockquote
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…