I think there is a larger problem with JS and OOP.
Javascript (and Typescript for that matter) was not built with OOP in mind making it difficult to do OOP properly. For example, OOP implies that you copy objects, which is rather difficult in JS, as you deal with references to other objects.
I think there is a larger problem with JS and OOP.
Javascript (and Typescript for that matter) was not built with OOP in mind making it difficult to do OOP properly. For example, OOP implies that you copy objects, which is rather difficult in JS, as you deal with references to other objects.
Kyle Sympson explains it better than I would ever do here : github.com/getify/You-Dont-Know-JS...
He also adresses the 'class' syntactic sugar here : github.com/getify/You-Dont-Know-JS...