Decisions with If/Else Statements

Decisions with If/Else Statements

Grade 7th Grade · Computer Science · 50 min

What's Included

Learning Objective

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

Warm-Up Video

Joseph Delgadillo · 10:54

Learn JavaScript Episode #7: If/Else Statements

Guided Notes

3 key concepts

  • 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

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

  • 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.

Practice Questions

10 questions · Multiple choice & Short answer

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.".

Complete Lesson Package

Get all 3 ready-to-use resources:

Teacher GuideComplete lesson plan
Student DocPrintable student handouts
SlidesReady-to-use presentation