Please enable JavaScript to use CodeHS

AP Computer Science A (Mocha)

Lesson 2.11 If Statements

Description

This lesson introduces If Statements. We use if statements to run a segment of code only if some boolean expression first evaluates to true.


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