3 ms·
The main point is that when you realise you forgot to set reindeerCount = 0. If closing the workshop is the only situation in which you fire all the reindeer, i
by qu4z-2 14y ago
The main point is that when you realise you forgot to set reindeerCount = 0. If closing the workshop is the only situation in which you fire all the reindeer, it's probably fine. If you need to fire the reindeer in other situations, you now need to manually fix the code everywhere.
- BruceIV 14y agoThanks, good catch (my code probably would have been better if I had an actual use-case instead of a contrived example).