The `or` keyword
Combining two conditions with || so the whole condition is true when at least one of the parts is true.
We can also use or, and again, sadly, there's not a nice or keyword in JavaScript. Instead, we have to use these two bars next to each other to mean or. It looks weird, but it's really not. You'll get used to it.
So we can say if someone is over 20 or they're in disco gear, then they can come in. So we're gonna have a fun party with disco-dressed kids and badly dressed adults, which sounds reasonable.
if (age > 20 || outfit === "disco") {
openDoor()
}

There's one thing that trips people up with both and and or, and that's that each side of the and/or needs to be a complete comparison. So even if you're comparing the same variable on both sides, you have to repeat it. You can't write if age is less than 13 or greater than 20. You have to write if age is less than 13 or age is greater than 20. You need both sides to be complete comparisons.
if (age < 13 || age > 20)
You need to think about when both conditions matter and when only one of them needs to be true.
Ready to Start Your Coding Journey?
Join thousands of learners on Jiki. Practice coding exercises, get feedback from mentors, and level up your skills — it's free!
Sign Up For Free