3 ms·
>and the 'class' describes well what it does: wrap things together that belong together. So does "Object". All "Class" does, here is paper over some of the com
by krapp 8y ago
>and the 'class' describes well what it does: wrap things together that belong together.
So does "Object". All "Class" does, here is paper over some of the complexity of making JS objects.
If anything, JS classes hide necessary concepts about the language from the developer. At least with the old, ugly way of doing things, you were forced to confront prototypes and scope and how 'this' worked.