Skip to content

Latest commit

 

History

History
21 lines (10 loc) · 698 Bytes

17.md

File metadata and controls

21 lines (10 loc) · 698 Bytes

As you write more and more code inside main(), you'll notice that it becomes increasingly cluttered and messy.

And the more code you write, the more unreadable that it becomes.

Functions

A function is a grouping of code, it performs a task, and obviously it's reusable.

Some functions rely on parameters to perform their task.

Some functions will return a final value.

image-20230423202020449

Instead of writing all of your code inside of a single code block,

you can split it up into functions and call them as needed.

Let's begin organizing your code using functions!