We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df37abd commit 31fcc7dCopy full SHA for 31fcc7d
Sprint-3/quote-generator/quotes.js
@@ -20,6 +20,8 @@ function pickFromArray(choices) {
20
return choices[Math.floor(Math.random() * choices.length)];
21
}
22
23
+
24
25
// A list of quotes you can use in your app.
26
// DO NOT modify this array, otherwise the tests may break!
27
const quotes = [
@@ -491,3 +493,10 @@ const quotes = [
491
493
];
492
494
495
// call pickFromArray with the quotes array to check you get a random quote
496
497
+//window.addEventListener("load",pickFromArray(quotes))
498
+const randomQuote = pickFromArray(quotes);
499
+const quote=document.getElementById("quote")
500
+const author=document.getElementById("author")
501
+quote.innerText=randomQuote.quote
502
+author.innerText=randomQuote.author
0 commit comments