4 ms·
Ah, I stand corrected, thanks. Makes sense; I think I had something about private vars in JavaScript and closures running through my head and confused it with
by Fr0styMatt 13y ago
Ah, I stand corrected, thanks. Makes sense; I think I had something about private vars in JavaScript and closures running through my head and confused it with 'JavaScript does OO with closures' :)
- gnaritas 13y agoNo problem. People who don't like or get prototypes have certainly reimplemented classes with closures, but classes are not a requirement to be OO, objects are; classes are just one way to do it, prototypes are another. Objects don't require classes, though many a JavaScript programmer thinks so.