title: JavaScript - cannot set property of undefined
body: <p><strong>My code:</strong></p>
  
  <pre><code>var a = "1",
  b = "hello",
  c = { "100" : "some important data" },
  d = {};
  
  d[a]["greeting"] = b;
  d[a]["data"] = c;
  
  console.debug (d);
  </code></pre>
  
  <p>I get the following error: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot set property 'greeting' of undefined.</p>
  </blockquote>
  
  <p>I'm trying to do something similar to an associative array. Why isn't this working?</p>