HTML/Html-Javascript/22-比较运算符.html
2023-05-01 19:37:40 +08:00

31 lines
611 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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(1>=3); //false
console.log(1<=3);//true
console.log(1==1);//true
console.log(1===1);//true
console.log(1==true);//true
console.log(1==="1");//true
console.log(1===true);//false
//== 再js中用与比较结果
//=== js中用于比较结果以及类型
</script>
</body>
</html>