title: Number returning NaN?
body: <p>I am working with objects with numerous properties and using those properties to draw to canvas.  Some properties I am calculating using the others.  However, I am hitting an issue!</p>
  
  <p>Basically, I have an object with numerous properties and although when I check the type of data stored in the properties it returns "Number", when I call the property I am getting NaN... and therefore I cannot use this when drawing to the canvas element.  </p>
  
  <p>So basically, I have this:</p>
  
  <pre><code>var MasterObject = {
      Object1: {
          width: Number(document.getElementById("width").value),
          height: Number(document.getElementById("height").value),
          border: 65,
          lines: Math.round((this.width - this.border* 2) / 60),
          lineSpace: (this.width - this.border* 2) / this.lines,
          lineSpace1: this.lineSpace
      }
  };
  </code></pre>
  
  <p>The width, height and border properties return "Number" when using "typeof" in console.log() or alert().  When calling these properties I get the number that they store!</p>
  
  <p>Although the property "lines" also returns "Number", when I actually try to call the property it returns "NaN".  </p>
  
  <p>The width, height and border, although worked out dynamically, are always a whole integer and I have tried wrapping the "line" property value with Number [i.e. Number(Math.round((this.width - this.border* 2) / 60)) ].</p>
  
  <p>I have also read to try parseInt(), etc, but that is not working either.  </p>
  
  <p>I'm sure this is something simple but I can't get my head around what is going on.  Why is the type of data returning Number but the actually data is returning NaN...  I'm confused!!</p>
  
  <p>Appreciate any help.</p>