From 227287c6244e8c0ac23f9dfb9854f17107521479 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Mon, 5 Aug 2024 18:54:55 +0200 Subject: [PATCH] Move getQuote() call to the end of the script --- js-essentials/random-ron/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js-essentials/random-ron/script.js b/js-essentials/random-ron/script.js index 78ff925..dc57dff 100644 --- a/js-essentials/random-ron/script.js +++ b/js-essentials/random-ron/script.js @@ -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(); +