Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Learn

A function is a block of code designed to perform a task.

Functions are like recipes. They take data or variables, perform a set of tasks on them, and then return the result.

For instance, to make ice cream, you can put sugar, cream, and ice into an ice cream machine, and it will output delicious ice cream. The stuff that happens in the middle, where the ingredients are operated on, that's what functions do. They take inputs, operate on them, then output a result.

Let's look at one, then we'll break it down:

function sayHello() { console.log('Hello, my name is Jon'); } sayHello();
Report a Bug
If you see a bug or any other issue with this page, please report it here.