title: javascript why does word return an array and word[0] undefined javascript
body: <p>I'm trying to make my website bilingual.
  so I would like to iterate my JS object translation. I can iterate it with this code :</p>
  <pre><code>for (var word of translation) {
      console.log(word);
  }   
  </code></pre>
  <p>but then I get this:</p>
  <p>from the moment I use this code I undefined</p>
  <pre><code>for (var word of translation) {
      console.log(word[0]);
  }   
  </code></pre>
  <p>this is my object model</p>
  <pre><code>    translation = [ 
        { English : [ [&quot;English&quot; , &quot;engels&quot;], [&quot;lblEng&quot;,&quot;&quot;] ]}, 
        {dutch : [[&quot;dutch&quot; , &quot;nederlands&quot;], [&quot;lblNl&quot;,&quot;&quot;]]},
        { second : [[&quot;second&quot;,&quot;seconde&quot;], [&quot;sec&quot;,&quot;&quot;]]},
        {minut : [[&quot;minut&quot;, &quot;minut&quot;],[&quot;min&quot;,&quot;&quot;]]},
        { hour : [[&quot;hour&quot;,&quot;uur&quot;],[&quot;h&quot;,&quot;&quot;]]},
        { day :[ [&quot;day&quot;, &quot;dag&quot;],[&quot;d&quot;,&quot;&quot;]]}, 
        { to : [[&quot;to&quot;, &quot;naar&quot;],[&quot;to&quot;,&quot;&quot;]]},
        { from : [[&quot;from&quot;, &quot;van&quot;],[&quot;from&quot;,&quot;&quot;]]}
      ]
  </code></pre>