1// The Or operator in Javascript is 2 vertical lines = ||
2
3//Example
4var firstnumber = 10;
5var secondnumber = 20;
6
7//The Or operator in action
8if(firstnumber > 20 || secondnumber< 10) {
9}
1//The OR operator in Javascript is 2 verticals lines: ||
2
3var a = true;
4var b = false;
5
6if(a || b) {
7 //one of them is true, code inside this block will be executed
8}
1//OR Operator
2
3const x = 7;
4const y = 4;
5
6(x == 5 || y == 5); // false
7(x == 7 || y == 0); // true
8(x == 0 || y == 4); // true
9(x == 7 || y == 4); // true
10