"JavaScript’s choice to build OOP out of simple parts–objects, functions, and properties–makes the development of new ideas possible."
They did things like every other language basically. Everything is a pointer, and types are just abstractions we placed on things. So Functions, Objects, Properties can be passed around just like any other variable or even merged together fairly easily. Some languages hide this from you.. some require that you ask very nicely if you do things like this(pascal).. and others simply don't care what you do(c++).
They did things like every other language basically. Everything is a pointer, and types are just abstractions we placed on things. So Functions, Objects, Properties can be passed around just like any other variable or even merged together fairly easily. Some languages hide this from you.. some require that you ask very nicely if you do things like this(pascal).. and others simply don't care what you do(c++).