12345678910111213141516171819202122 |
- <!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(5 < 4 || 4 < 2);
- console.log(5 > 4 && 4 > 2);
- console.log(4!=2)
- </script>
- </body>
- </html>
|