mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 06:21:29 +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;
|
||||
}
|
||||
updateQuality() {
|
||||
for (var i = 0; i < this.items.length; i++) {
|
||||
this._updateItem(this.items[i]);
|
||||
}
|
||||
this.items.forEach(item =>
|
||||
this._updateItem(item)
|
||||
)
|
||||
return this.items;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user