By the end of this class, students will be able to:
In real life, we make decisions all the time.
🧍Example:
Similarly, in programming, we use conditional statements to make decisions based on conditions.
They help the program decide which block of code to execute depending on whether a condition is true or false.
Used to execute code only if a condition is true.
let age = 20;
if (age >= 18) {
console.log("You can vote!");
}
🗣️ Real-life: