About 87,000 results
Open links in new tab
  1. How to create a derived class in JavaScript? - Stack Overflow

    How to extend a class in JavaScript. 1. Extending javascript "class" (object) 2. javascript inheritance ...

  2. oop - How to extend a class in JavaScript - Stack Overflow

    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 …

  3. javascript - ES6 Class Multiple inheritance - Stack Overflow

    Apr 26, 2015 · @Michael I don't think what you propose is possible with single inheritance. A class E cannot simultaneously extend both B and D. You will first have to make a new class …

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

    May 15, 2015 · If you want to actually extend String, instead of just adding a method to String itself, and get that warm ES6 feeling, you could try: class MyString extends String { …

  5. Javascript extends class - Stack Overflow

    JavaScript doesn't have classes. Therefore, this entire question doesn't make sense. Are you talking about Java? Or ActionScript? Those do have classes, but they have absolutely nothing …

  6. How to extend existing class with new properties in javascript?

    May 8, 2014 · The problem with. DisplayObject.prototype.velocity = new Vector2d(); is that, if a DisplayObject instance doesn't have an own velocity property, it will inherit that one from the …

  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 …

  8. javascript - How to extend Function with ES6 classes ... - Stack …

    Apr 27, 2016 · There is a simple solution which takes advantage of JavaScript's functional capabilities: Pass the "logic" as a function-argument to the constructor of your class, assign …

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

    Feb 13, 2015 · Using a "helper function" Please note that in the above example that uses the Object.create API, if you do not call Person (the "super class") in the CoolPerson (the …

  10. Javascript: Extend a Function - Stack Overflow

    Jan 2, 2011 · The main reason why I want it is that I want to extend my initialize function. Something like this: // main.js window.onload = init(); function init(){ doSomething(); } // …

Refresh