title: Uncaught TypeError: Cannot read property 'player' of undefined
body: <p>I am trying to create this object programatically:</p>
  
  <pre><code>var data = {
    "player0": {
      "name":     "kahn",
      "pos":      "gk",
      "ability":  "best",
      "unsure":   0,
      "waiting":  1
    },
    "player1": {
      "name" :    "recoba",
      "pos":      "cmf",
      "ability":  "inter",
      "unsure":   1,
      "waiting":  0
     }
  };
  </code></pre>
  
  <p>This is my attempt, but I get the error displayed in the title:</p>
  
  <pre><code>var test;
  test.player.name = "kahn";
  test.player.pos = "gk"; // enough properties for testing
  console.log(test);
  </code></pre>
  
  <p>How should I do it?</p>