Javascript inheritance : parent property not enabled
<p>Here is my code to achieve my inheritance:</p>

<pre><code>&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;JavaScript Patterns&lt;/title&gt;
    &lt;meta charset="utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;script&gt;
        /* Title: Classical Pattern #5 - A Temporary Constructor (a pattern that should be generally avoided)
         Description: first borrow the constructor and then also set the child's prototype to point to a new instance of the constructor
         */


        /* Basic */
        /*function inherit(C, P) {
         var F = function () {};
         F.prototype = P.prototype;
         C.prototype = new F();
         }*/


        /* Storing the Superclass */
        /*function inherit(C, P) {
         var F = function () {};
         F.prototype = P.prototype;
         C.prototype = new F();
         C.uber = P.prototype;
         }*/


        /* Resetting the Constructor Pointer */
        /*function inherit(C, P) {
         var F = function () {};
         F.prototype = P.prototype;
         C.prototype = new F();
         C.uber = P.prototype;
         C.prototype.constructor = C;
         }*/


        /* in closure */
        var inherit = (function () {
            var F = function () {
            };
            return function (C, P) {
                F.prototype = P.prototype;
                C.prototype = new F();
                C.uber = P.prototype;
                C.prototype.constructor = C;
            }
        }());


        function Parent(name) {
            this.nameParent = name || 'Adam';
            this.parentName = "parent";//this.nameParent;
        }


        // adding functionality to the prototype
        Parent.prototype.say = function () {
            return this.nameParent;
        };



        // child constructor
        function Child(nameChild) {
            console.log("parentprop:" + this.parentName);
        }

        inherit(Child, Parent);


        var kid = new Child();
        console.log(kid.name); // undefined
        console.log(typeof kid.say); // function
        kid.nameParent = 'Patrick';
        console.log(kid.parentName);
        console.log(kid.say()); // Patrick
        console.log(kid.constructor.nameParent); // Child
        console.log(kid.constructor === Parent); // false




        // reference
        // http://shop.oreilly.com/product/9780596806767.do
    &lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p>I need the Child console.log to display "parent" from the parent class inherited, but for now, it only displays undefined.</p>

<p>I don't know why it doesn't inherit from parent property.</p>

<p>Thanks in advance for your help.</p>
