JS: can I call parent method in overwritten method as in PHP?

In PHP you can:

class Test {
    public function run() {
        return '1';
    }
}

class Test2 extends Test
{
    public function run()
    {
        return parent::run() . ' 2';
    }
}

Test2::run() return ‘1 2’;

How do something like this in JS?

148 thoughts on “JS: can I call parent method in overwritten method as in PHP?”

  1. Howdy! I realize this is somewhat off-topic however I
    had to ask. Does running a well-established blog such
    as yours take a large amount of work? I’m brand new to operating a
    blog however I do write in my diary daily.
    I’d like to start a blog so I can share my own experience and thoughts online.
    Please let me know if you have any kind of ideas or tips for new aspiring blog owners.
    Appreciate it! http://droga5.net/

    Reply
  2. Pingback: viagra alternative
  3. Pingback: viagra connect
  4. Pingback: viagrahati
  5. Pingback: viagra canada
  6. Pingback: female viagra
  7. Pingback: order cheap cialis
  8. Pingback: sildenafil citrate
  9. Pingback: viagra online usa
  10. Pingback: sildenafil online
  11. Pingback: sildenafil 50 mg
  12. Pingback: non generic viagra
  13. Pingback: cheap cialis pills
  14. Pingback: tadalafil mylan
  15. Pingback: sildenafil coupon
  16. Pingback: viagra dosage
  17. Pingback: sildenafil
  18. Pingback: viagra foods
  19. Pingback: viagra en ligne
  20. Pingback: viagra receptfritt
  21. Pingback: walgreens viagra
  22. Pingback: viagra sildenafil
  23. Pingback: cialis viagra
  24. Pingback: female viagra pill
  25. Pingback: cialis tablets

Leave a Comment