From a63e8611628f773480d4bbc6f54487cdf222a417 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 22 Apr 2023 22:46:46 +0100 Subject: [PATCH] Remove unneccessary vars --- js/pis.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/pis.js b/js/pis.js index b9b372e..26a48b6 100644 --- a/js/pis.js +++ b/js/pis.js @@ -33,7 +33,6 @@ async function insertData(json) { Stations ` div.insertAdjacentHTML("beforeend", tableHtml) - const table = document.getElementById('result-table') const data = JSON.parse(json) let results = 0 for(var i = 0; i < data.length; i++) { // Break into separate function. Need to @@ -44,7 +43,7 @@ async function insertData(json) { results++ } tableData += "" - table.insertAdjacentHTML("beforeend", tableData) + document.getElementById('result-table').insertAdjacentHTML("beforeend", tableData) document.getElementById('result-count').textContent = results }