typeof & instanceof 的用法

1、typeof操作符返回一個字符串,指示未經計算的操作數的類型。【檢測不出是否爲Array】 alert(typeof null); // "object"  alert(typeof function () {  return 1;  }); // "function"  alert(typeof 'hhh'); // "string"  alert(typeof 1); // "number
相關文章
相關標籤/搜索