Imagine making a hamburger:
What if you had to say each step every time you ordered a hamburger? It’s tedious. It takes a long time. (How do you fit that on a menu?) And it risks making mistakes.
In this lesson you will learn a solution to that problem: methods. A method is a reusable set of instructions that perform a specific task. Developers use methods to make their code organized, maintainable, and repeatable.
You might hear methods also called functions — for now, the difference isn’t important to us.
By the end of this lesson you will be able to recognize methods, call them with multiple arguments, capture their returned values, and define a basic method.