async function addQuotesToPage() {
  const serverResponse = await fetch('/quote');
  const responseJson = await serverResponse.json();

  // Get a random quote from the json quotes
  const quoteAuthor = responseJson.authorName;
  const quoteText = responseJson.quoteText;

  // Get the quote container and add the quote into it
  const quoteContainer = document.querySelector('.quote-container');
  quoteContainer.innerHTML = `"${quoteText}" - ${quoteAuthor}`;
}
/**
 * Fetch quotes from the server and appends them to the page
 */
Fetch quotes from the server and appends them to the page
Fetch quotes from the server and appends them to the page
async function addQuotesToPage() {
  const serverResponse = await fetch('/quote');
  const responseJson = await serverResponse.json();
  const quoteAuthor = responseJson.authorName;
  const quoteText = responseJson.quoteText;
  const quoteContainer = document.querySelector('.quote-container');
  quoteContainer.innerHTML = `"${quoteText}" - ${quoteAuthor}`;
}
async function addQuotesToPage ( ) { const serverResponse = await fetch ( '/quote' ) ; const responseJson = await serverResponse . json ( ) ; const quoteAuthor = responseJson . authorName ; const quoteText = responseJson . quoteText ; const quoteContainer = document . querySelector ( '.quote-container' ) ; quoteContainer . innerHTML = ` ${ quoteText } ${ quoteAuthor } ` ; }
Fetch quotes from the server and appends them to the page
Fetch quotes from the server and appends them to the page
// Get a random quote from the json quotes // Get the quote container and add the quote into it