mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
Switch for loop for foreach
This commit is contained in:
parent
164bea88fb
commit
9111104f97
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user