Why output undefined?
<h1>Question</h1>

<p>Here, I created</p>

<ul>
<li>an <code>Owner</code> object using contructor</li>
<li>a <code>Camera</code> object using contructor</li>
</ul>

<p>In the 2nd output statement, i was expecting it to show as the 1st statement, but it shows undefined.</p>

<p>This is probably because of the way i've written the <code>summary()</code> method as in <code>this.owner</code>, <code>this.make</code>, etc.</p>

<p><strong>Note:-</strong> The 1st output statement accesses the variable values from outside of constructor.
But in the 2nd output statement the <code>summary()</code> method accesses the variables inside the constructor itself.</p>

<p>Shouldn't the make variable (not arguments) be used in that way?
How to use them inside the object contructor?</p>

<p>Please help me understand this concept.
And also please provide some reference where I could grasp this concept.</p>

<p><strong>Run test: <a href="http://labs.codecademy.com/hif/2#%3aworkspace" rel="nofollow">Code Snippet @ CodeAcademy Workspace</a></strong></p>

<h2>Code Snippet</h2>

<pre><code>//camera object contructor
function Camera(model, make, year, owner)
{
    this.make = make.toString();
    this.model = model.toString();
    this.year = parseInt(year);
    this.owner = function(){
        return (owner.fname + " " + owner.lname).toString();
    }();
    this.summary = function(){
        return this.owner + " bought a " + this.make + " " + this.model + ", released in " + this.year + ".";
    }();
}

//owner object contructor
function Owner(fname, lname){
    this.fname = fname;
    this.lname = lname;
}

//create owner
var niky = new Owner("Niky", "Bauxi");
//create camera for owner
var niky_cam = new Camera("DSLR D3100", "Nikon", 2009, niky);

console.log(niky_cam.owner + " bought a " + niky_cam.make + " " + niky_cam.model + ", released in " + niky_cam.year + ".");
console.log(niky_cam.summary);
</code></pre>

<h2>Output</h2>

<pre><code>Niky Bauxi bought a Nikon DSLR D3100, released in 2009.
undefined bought a undefined undefined, released in undefined.
</code></pre>

<h2>Solution</h2>

<p>After considering different answers &amp; comments,</p>

<p>Solution 1: <a href="http://labs.codecademy.com/hif/6#%3aworkspace" rel="nofollow">CodeAcademy workspace</a></p>
