Optimized Reused Values for Loops

This commit is contained in:
Onyx Azryn 2020-10-10 08:33:24 -05:00
parent 8ec42ca2e5
commit 234fcb09c2
19 changed files with 91 additions and 54 deletions

View file

@ -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];