function say_yes(){ console.log("yes") } Obj={} Obj=say_yes Obj.something="something" Obj.nothing="nothing"在瀏覽器中在上面的代碼中 if i console.log(Obj),它給出了函數表達式 在上面的代碼中 if i console.log(Obj.something)or console.log(Obj.nothing),它給出了屬性值。當我稱它為Obj()控制臺 時"yes"IN NODE 在上面的代碼中,如果我 console.log(Obj),它給出{ [Function: say_yes] something: 'something', nothing: 'nothing' }在上面的代碼中,如果 iconsole.log(Obj.something)或console.log(Obj.nothing),它給出了屬性值。當我稱它為Obj()控制臺 時,"yes" 我真的很困惑 Obj 是一個函數嗎?是對象??module.exports看到express 框架的源代碼后,我產生了這個疑問有人能解開我的疑惑嗎..
express 框架的 moule.exports
HUH函數
2022-07-08 18:16:02