js判斷一個對象是否是函數對象

使用typeof的值判斷,若是爲"function"則說明是函數函數 eg:code if(typeof setName === "function"){ console.log("我是一個函數"); }
相關文章
相關標籤/搜索