检测数据类型的方法

  • 基本数据类型检测
    typeof()
  • 数组检测
    [] instanceof Array
  • 万能检测
    Object.prototype.toString.call()
posted @ 2019-03-18 17:50  JJLB  阅读(141)  评论(0编辑  收藏  举报