操作符优先级

 1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6 </head>
 7 <body>
 8 <script>
 9 //    (false || true) && !(false && true);
10 //    true && true
11 //    var bool = ((4 >= 6) || ("人" != "阿凡达")) && !(((12 * 2) == 144) && true);
12 //
13 //    console.log(bool);
14 //
15 //
16 //    var num  = 10;
17 //    // 5 == num / 2 && (2 + 2 * num).toString() === "22"
18 //    // 5 == 5 && "22"==="22"
19 //
20 //    if(5 == num / 2 && (2 + 2 * num).toString() === "22") {
21 //        console.log(true);
22 //    }
23 //
24 //
25 //    var a = 1;
26 //    var b = 2;
27 //    a++;
28 //    var num = ++a + (a++) + a + (++b) + b++;
29 //              //  3 + 3 + 4 + 3 + 3;
30 //
31 //    console.log(num);
32 //
33 //    var aa  =   0&&1;
34 //    alert(aa)
35 //    var bb =  1&&0;
36 //    alert(bb);
37 //    var cc =  1&&10;
38 //    alert(cc);
39 //
40 //
41 //console.log(0||1);
42 //console.log(1||0);
43 //console.log(1||5);
44 //console.log(5||1);
45 
46 //var a = 1 && 2 && 3;
47 //console.log(a);
48 //var b = 0 && 1 && 2;
49 //console.log(b);
50 //var c = 1 && 0  && 2;
51 //console.log(c);
52 
53 //var a = 0 || 1 || 2;
54 //
55 //var b = 1 || 0 || 3;
56 //
57 //console.log(a),console.log(b);
58 
59 
60 //var a = 3  &&  0 || 2;
61 //var b = 3 || 0 &&  2;
62 //var c= 0 || 2 && 3;
63 //alert(a),alert(b),alert(c);
64 
65 
66 //var a = 1+1&&3;
67 //var b = 0 && 1+1;
68 //var c = 1 ||  2 && 3-1;
69 //alert(a);alert(b);alert(c);
70 
71 
72 
73 
74 
75 
76 </script>
77 </body>
78 </html>
原文地址:https://www.cnblogs.com/BingBing-Deng/p/10238149.html