DEV Community

loading...

Discussion on: I Don't Use JavaScript Classes At All. Am I Missing Out on Something?

Collapse
taufik_nurrohman profile image
Taufik Nurrohman

The thing that’s a bit off with the class syntax is that we can actually create more methods on the class itself without extending it to another class:

class Foo {
    bar() {}
    baz() {}
}

Foo.prototype.qux = function() {};
Enter fullscreen mode Exit fullscreen mode