March 2021
Beginner
404 pages
5h 47m
English
So far, we’ve learned quite a bit about coding, and if you’ve been completing the challenges, you’ve already put together some small bits of code. Wouldn’t it be great if we could save those bits of code and run them at any time in a program? That’s what we can use functions for!
In this chapter, we’ll cover:
A function is a block of code that’s almost like a small, self-contained mini program. They can help to reduce repetition and make code easier to follow.
Functions are a perfect application of the DRY principle (“don’t repeat yourself”). We should always be trying to not repeat ourselves, thus ...
Read now
Unlock full access