Is every JavaScript Object a function?

后端 未结 4 849
花落未央
花落未央 2020-12-10 18:31

Is there a JavaScript Object that is not a function?

javascript: x=y=z=Object; alert([window.navigator.userAgent,x,y,z].join(\"\\n\\n\"))

(

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 19:00

    You are assigning the Object constructor to the vars x, y and z. If you instead say x=new Object(), you will no longer see them referred to as functions.

提交回复
热议问题