This commit is contained in:
asd
2021-05-11 11:33:55 +08:00
parent 011d9328b0
commit c5f18c6051
32 changed files with 2011 additions and 26 deletions

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
// var a=1
// function test(){
// alert(a) //undefined
// var a=2
// alert(a) //2
// }
// test()
// alert(a) // 1
// undefined 2 1
// alert(Boolean("non-empty string")) //true
// alert(Boolean(null)) //false
alert(alert(1)||2||alert(3)) //1
// alert(alert(1)&& alert(0)) //1
// &&如果第一个是false就不走第二个。
// alert没有返回值所以布尔值是false
// ||是第一个true不走第二个
</script>
</head>
<body>
</body>
</html>