Working with functions

theo_selin

Theo Selin

Posted on October 8, 2021

Working with functions

As I'm going into more intermediate coding with my class, we've talked a bit about best practices and how to "think" or "interpret" the different tools provided with coding.

Something that helped me a lot with understanding how to properly use functions is when our teacher @hassanmian told us to see them as different persons.

This got me thinking; so I found a good analogy for it in a relay race. The work that needs to be done has to be devided between the different runners evenly. It'd simply be unfair if one person had to to the whole race and the rest still gets cred for it.

So if it's a lot that needs to be done, the first function needs to hand the baton to the next function and so on.

I've got a feeling that my future DEV posts are going to involve more analogies, but it helps me anchor what I learn to something I understand and who knows; it might help somebody else out there.

💖 💪 🙅 🚩
theo_selin
Theo Selin

Posted on October 8, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Working with functions
programming Working with functions

October 8, 2021

Built-in String functions in JavaScript
programming Built-in String functions in JavaScript

February 1, 2021