JS基础语法---函数也是一种数据类型

1. 如何获取某个变量的类型? typeof

2. 函数是有数据类型 ,数据类型:是function

    function f1() {
      console.log("我是函数");
    }
    //如何获取某个变量的类型? typeof
    console.log(typeof f1);
    //函数是有数据类型,数据类型:是function 类型的

猜你喜欢

转载自www.cnblogs.com/jane-panyiyun/p/11949657.html