News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by dkrvt on Friday July 03, 2015 @02:25AM (#9823861)
I'm curious as I haven't found a good coding style guide about object inheritance in ES5.

I usually write this even though it's a bit verbose:

  function Child() {
    Parent.call(this);
  }
  Child.prototype = Object.create(Parent.prototype);
  Child.prototype.constructor = Child;
Any opinion on this or link to a good guide?
Re:Airbnb JavaScript Style Guide by yefim on Friday July 03, 2015 @03:08AM (#9823992)
ES6 actually solves this with it's new Class syntax.

  class Child extends Parent {
  }