typeof & instanceof 的用法

1、typeof操作符返回一个字符串,指示未经计算的操作数的类型。【检测不出是否为Array】 alert(typeof null); // "object"  alert(typeof function () {  return 1;  }); // "function"  alert(typeof 'hhh'); // "string"  alert(typeof 1); // "number
相关文章
相关标签/搜索