mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Optimized Reused Values for Loops
This commit is contained in:
parent
8ec42ca2e5
commit
234fcb09c2
19 changed files with 91 additions and 54 deletions
|
|
@ -295,7 +295,8 @@ function applyStoredOptions() {
|
|||
if (localStorage.getItem("distanceUnit")) applyOption(distanceUnitInput, localStorage.getItem("distanceUnit"));
|
||||
if (localStorage.getItem("heightUnit")) applyOption(heightUnit, localStorage.getItem("heightUnit"));
|
||||
|
||||
for (let i=0; i < localStorage.length; i++) {
|
||||
let localStorageLength = localStorage.length;
|
||||
for (let i=0; i < localStorageLength; i++) {
|
||||
const stored = localStorage.key(i), value = localStorage.getItem(stored);
|
||||
const input = document.getElementById(stored+"Input") || document.getElementById(stored);
|
||||
const output = document.getElementById(stored+"Output");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue