&& 两边都为true,结果才为true
    1.遇到false的情况,直接返回

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