I built an easy inheritance implementation for JavScript that works similar to other OO languages and wanted some feedback on it. This works perfectly how I'd like it to, but I've read a lot of varying opinions about using __proto__ and was wondering if there's a better way to do this.jsFiddle/** * * Extensible Prototype * */Object.prototype.extends = function(obj){        this.__proto__ = new obj;        return this;};  /** * * Parent Object * */var Person = function(name){        this.name = name;        this.sayName = function(){                alert(this.name);        };        return this;};/** * * Child Object * */var Programmer = function(name){        this.extends(Person);        this.name = name;        this.title = Software Engineer;        this.sayTitle = function(){                alert(this.title);        };};var eric = new Programmer('eric');eric.sayName();eric.sayTitle();
Object.extends in JS
javascript;object oriented;inheritance;prototypal class design