&& 两边都为true,结果才为true
1.遇到false的情况,直接返回
<!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>
/*
&& 两边都为true,结果才为true
1.遇到false的情况,直接返回
*/
console.log("abc" && 10);
console.log(0 && "abc");
</script>
</body>
</html>