123456789101112131415161718192021222324252627282930 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Document</title>
- </head>
- <body>
- <!--
- 关系运算符 > < = >= <=
- 逻辑运算符
- || 或 两方只要有一方是真 则为真;两方为假 才为假
- && 和 两方都为真 才为真;一方为假 则为假
- ! 非 取相反值 与等于号使用时=>不等于
- -->
- <script>
- // console.log(2<3 || 5<4);
- // console.log(2<3 || 1<4);
- // console.log(2>3 || 1>4);
- // console.log(2<3 && 5<4);
- // console.log(2<3 && 1<4);
- // console.log(2>3 && 1>4);
- console.log(!true);
- console.log(!0)
- console.log(5!=2)
- </script>
- </body>
- </html>
|