Javascript 中的函數(shù)是一個(gè)對象。在函數(shù)上運(yùn)行 typeof 時(shí),為什么它返回值“函數(shù)”而不是“對象”?var objLit = {}console.log(typeof objLit); // "object"function hello() { console.log("hello world");}console.log(typeof hello); // "function"
當(dāng) typeof 在函數(shù)上運(yùn)行時(shí),它返回“函數(shù)”作為類型。為什么它不返回“對象”?
尚方寶劍之說
2021-11-18 21:21:22