const quote = document.querySelector("#quotes")
const btn = document.querySelector("#quotesBtn")
const quotes = () =>{
const setHeaders = {
headers: {
'X-RapidAPI-Key':
'X-RapidAPI-Host':
}
}
fetch('https://famous-quotes4.p.rapidapi.com/random?category=education&count=1',setHeaders)
.then(response => response.json())
.then(data => quote.innerHTML=data)
.catch(err => err);
}
btn.addEventListener("click", quotes);
quotes();
I am unable to show the data of API in element tag. Error showing on website [object].