Javascript (since ES6 I think) also has classes-based OOP. For example :
class Polygon { constructor() { this.name = "Polygon"; } } var poly1 = new Polygon(); console.log(poly1.name);
I'm guessing that, behind the scenes, it's still PBP.
JavaScript classes are syntactic sugar for prototype-based OOP. See dev.to/andychiare/a-matter-of-class
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Javascript (since ES6 I think) also has classes-based OOP. For example :
I'm guessing that, behind the scenes, it's still PBP.
JavaScript classes are syntactic sugar for prototype-based OOP. See dev.to/andychiare/a-matter-of-class