Move getQuote() call to the end of the script
This commit is contained in:
parent
bbc7cd5966
commit
227287c624
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,6 @@
|
|||
let blockquote = document.querySelector('blockquote');
|
||||
let button = document.querySelector('button#get-quote');
|
||||
|
||||
getQuote();
|
||||
|
||||
function getQuote () {
|
||||
blockquote.textContent = 'Getting a fresh quote...';
|
||||
|
||||
|
@ -24,6 +22,8 @@ button.addEventListener('click', function (event) {
|
|||
getQuote();
|
||||
});
|
||||
|
||||
getQuote();
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue