1let a=12
2if(a!=5){
3 console.log(true)
4}
5since a is not equal to 5, it will print true
6
1let a=12
2if(a!=5){
3 console.log(true)
4}
5since a is not equal to 5, it will print true
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
1//&& returns true if both values are true
2//or returns the second argument if the first is true
3var a = true
4var b = ""
5var c = 1
6
7true && "" //""
8"" && 1 //""
9false && 5 //false