W19 // DECISIONS: IF, ELSE, BOOLEANS
JAN 20 · Ch 8 Sec 1-4 · DUE: Decision script
This week's deckPPTX
// RUN OF SHOW (8:45-10:15)
8:45
Stand-up: last week's deliverable graded, questions answered
9:20
At the keyboard: guided type-along
9:45
Build time: assignment or project work
10:10
Close: commit, push, and preview next week's reading
// THE POINT THIS WEEK
if, else if, else. Comparison and logical operators. Boolean thinking.
// TALKING POINTS
Programs that choose
- A boolean is exactly true or false, no maybes
- if runs a block when its condition is true; else catches the rest
- else if chains choices; order matters, first true wins
Comparison is a question
- === asks 'exactly equal?'; !== asks 'different?'
- && means both, || means either, ! flips
- This class uses ===, always; == has surprises we don't need
// LINKS