From 840d6e2ff5e1aaa8231852c0bcff24ad2e9f30f4 Mon Sep 17 00:00:00 2001 From: chopster44 Date: Fri, 21 Jul 2023 18:50:46 +0100 Subject: [PATCH] Javascript not understanding how arrays work --- frontend/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/index.js b/frontend/index.js index 29ad2e5..08de666 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -67,7 +67,7 @@ async function populateScreen() { ` } - for (let i = history.length; i > 0; i-=1) { + for (let i = (history.length -1); i >= 0; i-=1) { historyPage.innerHTML += `