Understanding Functions
A function is lines of code that you call from other places in your code to execute certain things. They're used far and wide, mostly when there's code you want to execute many times.
A function is lines of code that you call from other places in your code to execute certain things. They're used far and wide, mostly when there's code you want to execute many times.
A function takes the following shape, basically:
A function may return something, or not. Here's an example of a function that returns a value:
And here's one that does not return a value, but still executes something:
Last updated