What you will learn in this lesson
JavaScript does not always follow one single path. Sometimes it needs to make a small decision first.
That is what conditionals are for. They let JavaScript check something and then choose what to do next.
Your lesson goals are simple:
- understand what a conditional is in plain English
- read the idea of if this is true, do this
- see what changes when a false path is added
- connect conditionals back to booleans and comparison operators
- feel calmer when code starts making simple decisions
A conditional lets JavaScript check a condition first, then choose the matching action.