Hi @Carlosvh96,
Do let us know if there is anything you still don’t understand and we’ll do our best to explain it in a way that helps you You’re doing the right thing by trying to practise more, as some of these concepts only “click” after working through some more examples. You’ll come across lots more examples as the course progresses, so don’t worry if there are still a few loose ends, as you’ll find these get tied up later on. But do let us know if there is anything major you are struggling with.
That’s right. It’s redundant because we don’t do anything with the new balance stored only temporarily as a property of the local user
variable.
This is the original code that you had to change, so there is no repetition here, it’s just incorrect and, as you say, redundant…pointless. We could just replace memory
with storage
, and that would solve the problem, but this would be less concise, and perhaps this is what you mean.
That’s absolutely correct. The version you chose does exactly that