JavaScript Foundations · Lesson 6 of 10

Functions

Learn how functions group instructions into reusable actions with names that make code easier to follow.

Starter 4 practice exercises 1 homework item

What you will learn

  • Explain what a function is in plain English.
  • Recognize the difference between defining a function and calling it.
  • Read tiny reusable JavaScript examples without panic.

Lesson shape

14 minute lesson with 11 sections, 4 exercises, 8 checkpoint questions, and 1 homework submission.

This track requires the Starter plan.

Lesson outline

What this lesson includes

This lesson is available with the Starter membership. Create an account to open the full student player, exercises, quiz, and completion tracking.

Overview

What you will learn in this lesson

Full lesson content unlocks in the student player.

Explain

What a function is in plain English

Full lesson content unlocks in the student player.

Explain

Why JavaScript uses functions

Full lesson content unlocks in the student player.

Practice

Tiny example 1: show a welcome message

Full lesson content unlocks in the student player.

Practice

Tiny example 2: update a piece of text

Full lesson content unlocks in the student player.

Practice

Tiny example 3: run the same small action more than once

Full lesson content unlocks in the student player.

Explain

Separate the parts of a function

Full lesson content unlocks in the student player.

Explain

Why functions are useful

Full lesson content unlocks in the student player.

Explain

Defining a function is not the same as calling it

Full lesson content unlocks in the student player.

Explain

Common beginner mistakes with functions

Full lesson content unlocks in the student player.

Wrap up

Short recap before lesson 7

Full lesson content unlocks in the student player.

Homework

Assignments attached to this lesson

Short code response

Functions: quick check

Create a very small example or corrected snippet that demonstrates the main idea from Functions.

Not started

Open homework