6.运算.html 561 B

12345678910111213141516171819202122
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. // 关系运算符 > = < >= <=
  11. /**
  12. * 逻辑运算符
  13. * || 或 一方成立则为真 都不成立才为假
  14. * && 且 都成立才成立 一方不成立则为假
  15. * ! 非 取反值
  16. */
  17. console.log(5 < 4 || 4 < 2);
  18. console.log(5 > 4 && 4 > 2);
  19. console.log(4!=2)
  20. </script>
  21. </body>
  22. </html>