3 ms·
I try to avoid OOP in my JavaScript code like the plague, I'd probably write it like this: function doSomething(obj){} var objs = [{},{},{}]; objs
by jeremiep 11y ago
I try to avoid OOP in my JavaScript code like the plague, I'd probably write it like this:
function doSomething(obj){}
var objs = [{},{},{}];
objs.forEach(doSomething);
If I need late binding I'll use something like clojure's multi-methods. Both closures and prototypes aren't needed for this :)