js数据类型undefined、null、Boolean、String、Number、Object、Symbol(es6)
    数据类型分为基本类型和引用类型
    基本类型
    String、Number、Boolean、Null、Undefined
    引用类型
    Object、Array、Date、Function、Error、RegExp、Math、Number、String、Boolean、Global

    判断数据类型的方法
    typeof、instanceof、constructor、Object.prototype.toString.call()

    ** 优点 缺点
    typeof 判断原始类型比较方便 null返回的是object;
    方法返回的是function;
    所有的引用类型都返回object。Array、Date等不能准确定位
    instanceof 判断对象的具体类型 只能判断对象,原始类型不行
    多全局对象时返回不正确
    不能跨iframe
    constructor 不存在多全局环境问题 只能判断本地对象和宿主对象
    null和undefined不行
    constructor易被修改、不能跨iframe
    Object.prototype.toString.call 能检测出全部类型

    https://blog.csdn.net/lhjuejiang/article/details/79623973