File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -496,16 +496,16 @@ const quotes = [
496496
497497// call pickFromArray with the quotes array to check you get a random quote
498498let randomQuote = pickFromArray ( quotes ) ;
499- console . log ( randomQuote ) ; // maybe logs { quote: "...", author: "..." }
499+
500500
501501const quoteElement = document . getElementById ( "quote" ) ;
502502 const authorElement = document . getElementById ( "author" ) ;
503503 const newquoteButton = document . getElementById ( "new-quote" ) ;
504504
505505 function displayRandomQuote ( ) {
506506 const randomQuote = pickFromArray ( quotes ) ;
507- quoteElement . innerText = `"${ randomQuote . quote } "` ;
508- authorElement . innerText = `- ${ randomQuote . author } ` ;
507+ quoteElement . textContent = `"${ randomQuote . quote } "` ;
508+ authorElement . textContent = `- ${ randomQuote . author } ` ;
509509 }
510510 displayRandomQuote ( ) ;
511511 newquoteButton . addEventListener ( "click" , displayRandomQuote ) ;
You can’t perform that action at this time.
0 commit comments