I am expecting my console.log to print "Creature and Charles" however it only prints Creature:
function creature() {}
creature.prototype.name = 'Creature';
creature.prototype.showName = function () {
return this.constructor.uber ? this.constructor.uber.toString() + ',' + this.name : this.name;
}
function dog() {}
var F = function () {}
dog.prototype = new F();
dog.prototype.constructor = dog;
dog.prototype.name = 'Charles';
dog.uber = creature.prototype;
dog.prototype = creature.prototype;
var cat = new dog();
console.log(cat.showName());
Any help?