I'm creating a quote generator, and im trying to get the author. I'd think its response.originator.name but it pulls up an error. 
Then i tried response[1].name and it just pulls up a undefined response
Here is the code
I'm creating a quote generator, and im trying to get the author. I'd think its response.originator.name but it pulls up an error. 
Then i tried response[1].name and it just pulls up a undefined response
Here is the code
.then is used to get the result of a Promise, you can't just keep calling it to a execute another line of code.
fetch(url)
.then(response => response.json())
.then(response => {
quote.innerText = response.content;
name.innerText = response.originator.name;
})
.catch(err => console.error(err));