Please enable JavaScript to use CodeHS

Introduction to Computer Science in JavaScript (Bulldog)

Lesson 5.4 If Statements

Description

In this lesson, students learn about if statements as a way to make decisions and execute specific code depending on the validity of a condition.


Objective

Students will be able to…

  • Explain the purpose of if statements
  • Create their own if statements to selective choose which code is executed in their programs

Activities

These are all the activities included in the lesson

5.4.1 If Statements
5.4.2 If Statements Quiz
5.4.3 Negative Numbers
5.4.4 Great Names
5.4.5 Even and Odd
5.4.6 Secret Password
5.4.7 Teenagers
5.4.8 Dietary Restrictions
5.4.9 Conditionals Badge
5.4.10 Mindset Survey 2