3 ms·
It's probably not common, but for me the answer lies here: > I don't recall seeing them used as substitutes for classes or vice versa for years at this point
by Weebs 6y ago
It's probably not common, but for me the answer lies here:
> I don't recall seeing them used as substitutes for classes or vice versa for years at this point
I had a fairly large school project developing a JavaScript application back before ES6, and kept searching for a better way to structure my code because I found it awkward using prototypes + binding this for events. Eventually I found a hidden golden nugget of a tutorial that showed me how to do it with closures and I was in awe that it somehow wasn't the norm (and obviously how cool it was to build objects out of functions!)