<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>

    //函数也是一种数据类型。但是,归根结底,他还是属于object。

    var str = "abc";
    var num = 111;
    var boo = true;
    var aaa;
    var bbb = null;//对象类型
    var arr = [];//对象类型

    function fn(){
        alert(1);
//        return 111;
    }

    console.log(typeof str);
    console.log(typeof num);
    console.log(typeof boo);
    console.log(typeof aaa);
    console.log(typeof bbb);
    console.log(typeof arr);
    console.log(typeof fn);
    console.log(typeof fn());

</script>
</body>
</html>

  

相关文章:

  • 2022-02-21
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-06-18
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2023-03-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案