title: Access Dictionary Object by String Index
body: <p>I am trying to fill a Dictionary (JavaScript object) and retrieve values from it using a string index. For some reason, it always returns <code>undefined</code> when I try to retrieve the values.</p>
  
  <p>My code goes something like this:</p>
  
  <pre><code>var _gauges = {};
  
  //fill the gauges
  _gauges[gaugeName] = gaugeObject;
  </code></pre>
  
  <p>And then I try to get access to it as follows:</p>
  
  <pre><code>    setValue: function (gaugeName, newValue) {
          var thisGauge = _gauges[gaugeName]; //always undefined
          console.log(_gauges); //output shows all the elements that were added to _gauges
          if (thisGauge) {
              thisGauge.setCell(0, 1, newValue);
          }
      }
  </code></pre>
  
  <p>Am I doing anything wrong here?</p>