typeof()与Object.prototype.toString.call()
时间:2019-10-01 18:48:39
收藏:0
阅读:75
用typeof方法只能初步判断number string undefined boolean object function symbol这几种初步类型
使用Object.prototype.toString.call(var) 能判断具体的类型数组,函数
1 var arr = [1,2,3]; 2 typeof(arr); 3 object.prototype.toString.call(arr)

原文:https://www.cnblogs.com/angle-yan/p/11615699.html
评论(0)