判断字符串、数组

 function type(obj){
          return Object.prototype.toString.call(obj).slice(8,-1)
      }
posted @ 2019-02-26 16:00  FE-神鸟  阅读(227)  评论(0)    收藏  举报