//在javascript中null表示「什麼都沒有」 ,是一個特殊的類型,表示一個空對象引用; var person = null; //值爲null(空),但類型爲對象 console.log(person); //null console.log(typeof person); //object//在javascript中, undefined是一個沒有設置值的變量 var person = undefined; //值爲undefined,類型爲undefined console.log(undefined); console.log(typeof person); //undefined