-
Notifications
You must be signed in to change notification settings - Fork 0
/
OR.js
64 lines (49 loc) · 1 KB
/
OR.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
alert
let resul= b||a;
console.log(resul);
console.log(true||true);
console.log(false||true);
console.log(true||false);
console.log(false||false);
let h= 9
if(h<10||h>18){
console.log('true');
}else{
console.log('false');
}
let j=10,k=10;
if(j === 10|| k === 10){
console.log('true');
}else{
console.log('false');
}
let j1=10,k1=10;
if(j1 === 10|| k1 === 5){
console.log('true');
}else{
console.log('false');
}
let j2=10,k2=10;
if(j2 === 5|| k2 === 5){
console.log('true');
}else{
console.log('false');
}
let houR= 12
let isWeekend=true;
if(houR<10 || houR>18 || isWeekend){
console.log('true');
}else{
console.log('false')
}
let firstN="";
let lastN="";
let nickN= 'supercoder';
console.log(firstN||lastN||nickN||Anonymous);
true||console.log('not printed');
false||console.log('printed');
console.log(null || 2 || undefined);
console.log(console.log(1) || 2 || console.log(3));
console.log(null || 2 && 3 || 4);
if (-1 || 0)console.log('first');
if (null ||-1 && 1)console.log('third');