Reference lesson

Functions

Package reusable behavior with inputs and outputs.

About 8 minutes

What you’ll learn

Functions name a task, accept parameters, and can return results. Small pure functions are particularly easy to test.

Try it yourself

Press Ctrl/Cmd + Enter to run.