var obj = {},ar = [],nothing=null,empty=undefined,word ='string',headorTail = true;
console.log(typeof obj) //object
console.log(typeof ar)//object
console.log(typeof nothing)//object
console.log(typeof empty)//undefined
console.log(typeof word)//string
console.log(typeof headorTail)//boolean
しかし、どうすれば obj,ar,nothing のタイプを取得でき"object, array,null"
ますか?これを達成するための最良の方法は何ですか?