2 ms·
Maybe your own code is functional, but the DOM and browser API you interact with is a prototype-based object model. A JavaScript application is basically event
by olavk 16y ago
Maybe your own code is functional, but the DOM and browser API you interact with is a prototype-based object model. A JavaScript application is basically event handlers attached to the DOM/browser framework, and you produce output by changing properties on these objects. So I don't think you can escape the OO paradigm.
(In most cases you don't need to know if the DOM is class based or prototype-based though. It only matters if you use advances features like modifying the prototype of an element.)
Even if you work outside the browser, you still have to work with the basic types like arrays in a OO manner.