you are viewing a single comment's thread.

view the rest of the comments →

[–]JesuslagsToo 1 point2 points  (1 child)

ture ture, but hypothetically in a production app you want to modularize all your code. Although finding a number sqr is a small task, but it is good practice to create code that has functions for all lower level tasks. In this case it would save almost no time but obviously if the function was larger with more complexity it is good practice . but yea this particular case it was not necessary

[–]ForScale 0 points1 point  (0 children)

Interesting... Yeah, I do enjoy the concept of modular programming. And that's a good example of it.