1.typeof返回的是类型名包括以下 7 种:number、boolean、symbol、string、object、undefined、function 等,(array,null除外)
typeof ''; // string 有效
typeof 1; // number 有效
typeof Symbol(); // symbol 有效
typeof true; //boolean 有效
typeof undefined; //undefined 有效
--------------------------------
typeof null; //object 无效
typeof [] ; //object 无效
-----------------------------
typeof new Function(); // function 有效
typeof new Date(); //object 无效
typeof new RegExp(); //object 无效
2.instanceof返回值真则返回true,否则返回 false
[] instanceof Array; //true
{} instanceof Object;//true
new Date() instanceof Date;//true
------------------------------------
[] instanceof Object; //true //也认为是Object的实例
-----------------------------------
var num=123;
document.write(num instanceof Number); //false
document.write(typeo