About 51 results
Open links in new tab
  1. oop - How to extend a class in JavaScript - Stack Overflow

    3 Extending a class can be done in different ways. The simplest method to extend an class is to use Object.create method. This is common method which is used to achieve abstraction (Link to my …

  2. Dynamically extending a class in javascript - Stack Overflow

    Apr 13, 2020 · How can we dynamically/programmatically extend a javascript class? More concretely, given something like

  3. How to create a derived class in JavaScript? - Stack Overflow

    How to create a derived class in JavaScript? Asked 12 years, 11 months ago Modified 1 year, 8 months ago Viewed 121k times

  4. javascript - ES6 Class Multiple inheritance - Stack Overflow

    Apr 26, 2015 · I'm wondering whether or not ES6 supports multiple inheritance in the same fashion as other duck-typed languages do. For instance, can I do something like: class Example extends …

  5. How to extend Function with ES6 classes? - Stack Overflow

    Apr 27, 2016 · ES6 allows to extend special objects. So it's possible to inherit from the function. Such object can be called as a function, but how can I implement the logic for such call? class Smth …

  6. Extending prototypes in Javascript - good way? - Stack Overflow

    Feb 13, 2015 · I know of J. Resig's Class/extend approach. But I'd rather use JavaScript as the prototypical language it is, not make it work as a "class-like behaving class-less OO language".

  7. function - Extending an Object in Javascript - Stack Overflow

    May 3, 2012 · Beware that this will create pointers to the original object in the 'child' class when using objects / arrays in the 'parent' class. To elaborate: If you have an object or array in your parent class, …

  8. javascript - Extend a String class in ES6 - Stack Overflow

    May 15, 2015 · 9 Your proposal works fine in ES6, is there something wrong with it? If you want to actually extend String, instead of just adding a method to String itself, and get that warm ES6 feeling, …

  9. How to call a parent method from child class in javascript?

    Here's how its done: ParentClass.prototype.myMethod(); Or if you want to call it in the context of the current instance, you can do: ParentClass.prototype.myMethod.call(this) Same goes for calling a …

  10. Extending parent class methods in child class in Javascript ES6

    Sep 15, 2017 · I want to extend a child's functionality of a specific method in a parent class. I'm still getting used to OOP in ES6 so I'm not sure if this is possible or breaks rules. I'm looking for …