Switch for loop for foreach

This commit is contained in:
Dan Holmes 2020-12-03 15:35:56 +00:00
parent 164bea88fb
commit 9111104f97

View File

@ -5,9 +5,9 @@ class Shop {
this.MIN_QUALITY = 0; this.MIN_QUALITY = 0;
} }
updateQuality() { updateQuality() {
for (var i = 0; i < this.items.length; i++) { this.items.forEach(item =>
this._updateItem(this.items[i]); this._updateItem(item)
} )
return this.items; return this.items;
} }