Everything is an object?

前端 未结 5 1477
南笙
南笙 2020-12-18 14:49

At one popular blog, the author asked his audience what was their “Ah ha!” moment for JavaScript and most of the people said that it was realizing that everything in JavaScr

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-18 15:21

    'ALMOST everything is an object' because the MAIN code-units are JS-objects. On primitives you can NOT add members for example as on all objects. My answer why JS-functions are JS-objects here: https://stackoverflow.com/a/24811539

提交回复
热议问题