This lesson requires you to know the basics of hamburger-making:

  • Place the bread down
  • Add the burger patty
  • Add the pickles
  • Place the bread on top

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: functions. You’ll learn how and why they are used in programming and be able to communicate their benefits to other programmers!

Functions are used throughout programming — in fact, some styles of programming rely completely on functions. Knowing this information will be useful for anywhere your programming path takes you.


Build hamburgers without a function: make three hamburgers by clicking on each instruction.

Hint: Add bread – Add burger patty – Add pickles – Add bread.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?