How would you write a program that tells if today is a weekend? We need to check if it's either Saturday or Sunday:
How can we write an if statement that's true when either condition is true? It's the weekend if day === "Saturday" OR day === "Sunday".
This is how we can check if day === "Saturday" OR day === "Sunday" using the || operator:
if (day === "Saturday" || day === "Sunday") { ...The || operator evaluates to true when at least one of the conditions is true. It only evaluates to false when all conditions are false.
Output (Console)