I understand this information is dated, but it should be updated as the language evolves and standards change. Surprises me to still see this floating around. You do not want to invoke your constructor when you set a prototype. If you want to use the parent constructor's behaviour in the child, it should be done in your child constructor using Foo.call(this, ...) or Foo.apply(this, [...]).
Object.create is supported by all modern browsers, and the Object.create polyfill can be found in Mozilla's documentation:
Object.create is supported by all modern browsers, and the Object.create polyfill can be found in Mozilla's documentation:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...