New to Prototypal Inheritance - Can't find the issue with Undefined variable
<p>I'm quite new to Prototypal inheritance in JavaScript and I'm trying to understand what's the issue here.</p>

<p>Simple code, we have two objects pet and pet2, pet2 inherits from pet.</p>

<pre><code>var Pet = function() {
    this.type="Dog";
    this.age = 4;
};

var Pet2 = function() {
    this.breed = "Kashon";
};

pet = new Pet();
pet2 = new Pet2();


if (Object.create !==  'function') {
    Object.create = function(oldObject) {
        function F() {}
        F.prototype = oldObject;
        return new F();
    };    
}

pet2 = Object.create(pet);
</code></pre>

<p>The issue is that when I try to access <strong>pet2.breed</strong>, it's undefined for some reason, why is this?</p>

<pre><code>alert(pet2.type); //ok
alert(pet2.age);  //ok
alert(pet2.breed); //comes out undefined?
</code></pre>

<p>Any help would be nice :D</p>
