Sure, this is a good exercise to understand different approaches to a problem. But the core question behind the difference is whether it makes sense to store values, or recalculate them every time you need them. If the author is trying to help people learn, talking about that difference and getting into some depth about scenarios where each choice would be appropriate would really round out the article to be more valuable to people learning to code.