| ▲ | epgui 3 hours ago | |||||||||||||
For clarity, what do you call "classical OOP"? (disclaimer: FP all the way, regardless) | ||||||||||||||
| ▲ | hungryhobbit 2 hours ago | parent [-] | |||||||||||||
Essentially `new Foo()`, where `Foo` can be a subclass of `Bar` that inherits properties in the same way we all learned in our Java (or whatever actual OOP) language. JavaScript gives you a class syntax that lets you make classes and extend them from each other, and for the most part they will work the same way as a class from a language like Java ... but some things won't. You can either become an expert on prototype chains, and how JS actually implements OOP (differently from Java) ... or you can just write factory functions instead of classes. | ||||||||||||||
| ||||||||||||||