title: EDIT: Why does typeof(0) return boolean instead of number
body: <p>ORIGINAL QUESTION: I have problem with JavaScript conversion. Here is an example:</p>
  
  <pre><code>var obj = {
      x: 0,
      y: 1,
      z: 2
  }
  
  var b1 = typeof (obj.x),
      b2 = typeof (obj.y),
      b3 = typeof (obj.z);
  </code></pre>
  
  <p>b1 is <code>"boolean"</code>, b2 is <code>"boolean"</code>, b3 is <code>"number"</code>.
  I need to set variable to 0 and i need JavaScript to interpret it as a number. I've tried with conversions such as b1 = Number("0") but it doesn't help :( </p>
  
  <p>EDITED: sorry for the q above. its true. b1, b2 and b3 all return number. This is my actual problem.</p>
  
  <pre><code>var SomeClass = function () {}
  SomeClass.prototype = {
      element: {},
      startAt: 0,
      length: 2,
      get: function (prop) {
          if (typeof (prop) === "undefined" || !(typeof (prop) === "string")) {
              return false;
          }
          if (!this[prop]) {
              return false;
          }
          return this[prop];
      }
  }
  
  var sc = new SomeClass();
  alert(typeof (sc.get("startAt")) + "\n" + typeof (sc.get("length")) + "\n" + typeof (sc.get("element")));
  </code></pre>
  
  <p>I would like to set startAt as an number. I am really sorry!!</p>