欢迎来到Cecilia陈的博客

孤独,是人一生最好的修行。

[05--JS] 数组对象

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        // ""(空字符串)、0、null、undefined、NaN都是false。

        console.log(Boolean(""));   // false
        console.log(Boolean(null));    // false
        console.log(Boolean(undefined));    // false
        console.log(Boolean(NaN));    // false
    </script>
</head>
<body>
</body>
</html>
posted @ 2019-10-16 23:43  Cecilia陈  阅读(72)  评论(0编辑  收藏  举报