You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I mean is, we run this.getTotalPrice(widgets), while we store on this.widgets a different collection based on the passed mode.
The total price of that collection should be different to the collection passed on this.getTotalPrice(widgets).
I have modified the function a bit to log the difference.:
Hi Lukas,
I have an understanding question on the first exercise. I was not sure, where and how to ask ... so I went to github ;).
If I am not mistaken the total price calculated and stored in
this.price
is different, then the total price of all widgets storedthis-widgets
?What I mean is, we run
this.getTotalPrice(widgets)
, while we store onthis.widgets
a different collection based on the passedmode
.The total price of that collection should be different to the collection passed on
this.getTotalPrice(widgets)
.I have modified the function a bit to log the difference.:
Log:
The total price stored in
this.price
is0
while the total price on all widgets stored inthis.widgets
is100
.From my understanding, the total price function
getTotalPrice
should be executed on the return value ofupdateWidgets
.I hope, I could make the issue clear.
Best
Torsten
The text was updated successfully, but these errors were encountered: