DEV Community

Merlier
Merlier

Posted on

OOP in JS : one thing to keep in mind

Yes, the first function has no relationship with an object instance of that constructor function, you can consider it like a 'static method'.

In JavaScript functions are first-class objects, that means you can treat them just like any object, in this case, you are only adding a property…

Top comments (0)