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

@ -457,7 +457,8 @@ function ra(array) {
function rw(object) {
const array = [];
for (const key in object) {
for (let i=0; i < object[key]; i++) {
let objectKey = object[key];
for (let i=0; i < objectKey; i++) {
array.push(key);
}
};