2 ms·
I did it the other way around. I wrote some JS before I really learned about JS idioms and a lot of my earlier code looked weird. Like the way I construct an ob
by kccqzy 7y ago
I did it the other way around. I wrote some JS before I really learned about JS idioms and a lot of my earlier code looked weird. Like the way I construct an object is to write a function (constructor) that does initialization and then returns an object full of closures, instead of assigning a function to Foo.prototype.bar etc.