13 ms·
The most "surprising" thing about both clean and unclean code ... is that they DON'T USE CLASSES. > Use the platform, use JavaScript !!
by abdellah123 3y ago
The most "surprising" thing about both clean and unclean code ... is that they DON'T USE CLASSES.
> Use the platform, use JavaScript !!
- janosdebugs 3y agoI found that the best use case for classes is dependency injection. Have a constructor, inject your dependencies, then use them in one or more functions. However, you can do the same with functions: function new_foo(dependency) { return function(bar) { // Do something here } }