From 94880385f319e335f595daf40750431d335a4895 Mon Sep 17 00:00:00 2001 From: "reda.hossino" Date: Mon, 20 May 2024 20:26:49 +0200 Subject: [PATCH 1/2] add variables not used --- 05 - Random Password Generator/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/05 - Random Password Generator/main.js b/05 - Random Password Generator/main.js index dfc4010c..217a47e2 100644 --- a/05 - Random Password Generator/main.js +++ b/05 - Random Password Generator/main.js @@ -40,7 +40,10 @@ const words = ['seat', 'pen', 'broad', 'vapor', 'ocean', function randomNumber (l) { - return Math.floor(Math.random() * l); + let y = Math.floor(Math.random() * l); + + let z = Math.floor(Math.random() * y); + return y; } function randomWord () { From b3ae45ae6ae007b1a28b13a29fd4dfb9ca445738 Mon Sep 17 00:00:00 2001 From: "reda.hossino" Date: Wed, 22 May 2024 17:44:08 +0200 Subject: [PATCH 2/2] modify more files --- 05 - Random Password Generator/main.js | 5 +++++ 06 - Calendar/dycalendar.js | 13 ------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/05 - Random Password Generator/main.js b/05 - Random Password Generator/main.js index 217a47e2..cb8af8a6 100644 --- a/05 - Random Password Generator/main.js +++ b/05 - Random Password Generator/main.js @@ -50,3 +50,8 @@ function randomWord () { const number = randomNumber(words.length); return words[number]; } + +function randomWord222 () { + const number = randomNumber(words.length); + return words[number]; +} diff --git a/06 - Calendar/dycalendar.js b/06 - Calendar/dycalendar.js index a4d77a04..2218a490 100644 --- a/06 - Calendar/dycalendar.js +++ b/06 - Calendar/dycalendar.js @@ -148,19 +148,6 @@ div.setAttribute("class", "dycalendar-header"); div.setAttribute("data-option", JSON.stringify(option)); - //prev button - if (option.prevnextbutton === "show") { - elem = document.createElement("span"); - elem.setAttribute("class", "dycalendar-prev-next-btn prev-btn"); - elem.setAttribute("data-date", option.date); - elem.setAttribute("data-month", option.month); - elem.setAttribute("data-year", option.year); - elem.setAttribute("data-btn", "prev"); - elem.innerHTML = "<"; - //add prev button span to header div - div.appendChild(elem); - } - //month span elem = document.createElement("span"); elem.setAttribute("class", "dycalendar-span-month-year");