typeof 爲什麼判斷null是對象類型?instanceof判斷的原理是什麼?

JS的數據類型有七種 原始類型: Boolean Number String undefined null Symbol 對象類型 Object 用typeof判斷類型 會出現下面的問題 typeof null // Object typeof判斷其他的原始類型不會出現問題。 typeof 22 // 'number' typeof 'lorry' // 'string' typeof undef
相關文章
相關標籤/搜索