Bridge Concepts Beginner
A function is a named set of steps that does a job.
A function is a named set of instructions that performs a task. You call it by its name, and it does the job. It is like a helper you can call anytime.
You already know the idea: the same instructions can be used again. A smoothie recipe, brushing your teeth, pressing a button, same steps, used many times.
Computers give functions names with parentheses, like sayHello(), addPoints(), drawStar(), or playSong(). They run their steps whenever you call them.
Why do they matter? Functions keep programs organized, save time (write it once, use it many times), and let you reuse steps so you do not repeat yourself.
Here is a real example. You make a function called drawStar(). Then you call it again and again to draw a whole sky full of stars, same steps, many times.
Remember: functions have names, they do a job, and you can use them again and again.
A function is a named, reusable block of code that performs a task, optionally taking parameters and returning a result. Functions are core to organizing programs (decomposition), avoiding repetition (DRY), and reuse. They pair with variables and algorithms as the building blocks of coding.
Want the full story? These go deeper: