The if, else statement is used to check if something meets a condition, and if it does, great, but if it doesn’t, do something else.
- if(meetsCondition){
- // Have a party
- } else {
- // Be really, really sad
- }
The meetsCondition part is called a boolean, it’s either true or false. So you can read that code like this:
- if(true){