typeof
var s = "Nicholas";
var b =true;
var i =22;
var u;
var n =null;
var o =new Object();
alert(typeof s); //string
alert(typeof i); //number
alert(typeof b); //boolean
alert(typeof u); //undefined
alert(typeof n); //object
alert(typeof o); //object
instanceof
alert(person instanceof Object); //变量person是Object吗?
alert(colors instanceof Array); //变了colors是Array吗?
原文:http://liuxinyun.blog.51cto.com/8263686/1895632