From 70be8b6388e75c82b157827d9d976fde5b09e4d0 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Fri, 16 Aug 2024 19:16:49 +0200 Subject: [PATCH] Fix the loop --- structure-and-scale/treasure-chest-chaining-static/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure-and-scale/treasure-chest-chaining-static/script.js b/structure-and-scale/treasure-chest-chaining-static/script.js index bdeadf1..90fe0b4 100644 --- a/structure-and-scale/treasure-chest-chaining-static/script.js +++ b/structure-and-scale/treasure-chest-chaining-static/script.js @@ -51,7 +51,7 @@ let TreasureChest = (function () { Constructor.getRandomLoot = function () { let amount = []; - for (let qty = 0; qty <= 50; qty++) { + for (let qty = 0; qty < 50; qty++) { amount.push(qty+1); }