3 ms·
The nice thing about JavaScript is that you have first-class functions that are closures, so you don't have to do OOP at all if you don't want to. And your obje
by kyllo 11y ago
The nice thing about JavaScript is that you have first-class functions that are closures, so you don't have to do OOP at all if you don't want to. And your objects don't have to define methods because you can just define functions outside of methods.
And although JavaScript's prototypes don't solve the fragile base class problem, they do offer a handy solution to the expression problem: http://www.jayway.com/2013/06/21/15201/ http://www.jayway.com/2013/06/21/15201/