Skip to content

Commit 4354165

Browse files
committed
Implement quote generator
1 parent d4189cd commit 4354165

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎Sprint-3/quote-generator/quotes.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
document.addEventListener("DOMContentLoaded", () => {
2+
const {quote, author} = pickFromArray(quotes);
3+
document.getElementById("quote").innerText = quote;
4+
document.getElementById("author").innerText = author;
5+
});
6+
7+
document.querySelector("button").addEventListener("click", () => {
8+
const {quote, author} = pickFromArray(quotes);
9+
document.getElementById("quote").innerText = quote;
10+
document.getElementById("author").innerText = author;
11+
});
12+
113
// DO NOT EDIT BELOW HERE
214

315
// pickFromArray is a function which will return one item, at

0 commit comments

Comments
 (0)