Overview
Students learn how to write and use if statements in JavaScript by debugging common problems, solving simple problems, or adding conditional logic into an existing app or game.Vocab
- Boolean - A single value of either TRUE or FALSE
- Boolean Expression - in programming, an expression that evaluates to True or False.
- Conditionals - Statements that only run when certain conditions are true.
- If-Statement - The common programming structure that implements "conditional statements".
- Selection - A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
New Code
if( ){ //code }
if ( ){ // if code } else { // else code }
__ == __
__ != __
__ > __
__ >= __
__ < __
__ <= __
Resources
-
(Optional) Flowcharts - Activity Guide (copy as MS Word, Google Doc)