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
|
|
@ -620,7 +620,8 @@ function selectIcon(initial, callback) {
|
|||
];
|
||||
|
||||
let row = "";
|
||||
for (let i=0; i < icons.length; i++) {
|
||||
let numberOfIcons = icons.length;
|
||||
for (let i=0; i < numberOfIcons; i++) {
|
||||
if (i%17 === 0) row = table.insertRow(i/17|0);
|
||||
const cell = row.insertCell(i%17);
|
||||
cell.innerHTML = icons[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue