Decisions with If/Else Statements

Free to teach as-is — the teacher guide, student handout, and slides are included.

Free — we'll email you an access link. Google Docs format.

Objective

I can write code using "if/else" statements to make decisions in JavaScript.

Part 1 of 4

Warm-up video

Joseph Delgadillo · 10:54

We don't generate video — this one is by Joseph Delgadillo on YouTube. The practice questions and exit ticket below were drafted by AI for this objective, and every question is editable in the teacher guide.

Part 2 of 4

Key concepts

3 concepts

  1. 1

    An `if` statement in JavaScript starts with the keyword if, followed by a comparison in parentheses, and code to execute in curly brackets.

  2. 2

    If the condition in an `if` statement is not true, an else statement can be used to execute alternative code.

  3. 3

    The `else if` statement lets you check multiple conditions in a sequence, executing the code block for the first condition that evaluates to true.

Part 3 of 4

Practice

10 questions

1

What keyword is used to start an 'if' statement in JavaScript?

2

Explain the purpose of the 'else' statement in relation to an 'if' statement.

Part 4 of 4

Exit ticket

Quick comprehension check

Write a JavaScript code snippet that checks if a variable called 'score' is greater than or equal to 70. If it is, print "You passed!". Otherwise, print "Try again.".

Sample answer included in the free materials

Get the materials

Teacher guide, student handout, and slides — free, in Google Docs format

  • Teacher Guide

    Complete lesson plan with answer keys and alternate activities

  • Student Handout

    Printable worksheet

  • Slides

    Ready to present

We'll ask for your email to send your access link — nothing else.

Teaching a group at a different level?

Where are your students right now? We'll rebuild this lesson to match — including the teacher guide, student handout, and slides, saved to your Google Drive.

Adapt This Lesson