From 75822e10266d6ebc76555402229291f784adf637 Mon Sep 17 00:00:00 2001 From: isabelboscan Date: Tue, 3 Sep 2024 02:11:02 +0000 Subject: [PATCH] random por who --- src/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.js b/src/app.js index b02a87c4b..25ebb1102 100644 --- a/src/app.js +++ b/src/app.js @@ -19,11 +19,11 @@ window.onload = function() { "while I was praying" ]; // declaring random variables - let rdm1 = Math.floor(Math.random() * who.length); - let rdm2 = Math.floor(Math.random() * action.length); - let rdm3 = Math.floor(Math.random() * what.length); - let rdm4 = Math.floor(Math.random() * when.length); + let randomWho = Math.floor(Math.random() * who.length); + let randomAction = Math.floor(Math.random() * action.length); + let randomWhat = Math.floor(Math.random() * what.length); + let randomWhen = Math.floor(Math.random() * when.length); // creating a sentence (the excuse) document.querySelector("#excuse").innerHTML = - who[rdm1] + " " + action[rdm2] + " " + what[rdm3] + " " + when[rdm4]; + who[randomWho] + " " + action[randomAction] + " " + what[randomWhat] + " " + when[randomWhen]; };