Why doesn't object dot notation work in a for...in loop?
<pre><code>car = { 
 color: 'green',
 speed: '340',
 drive: function() {
  alert("brrrrrrm");
 } 
}
</code></pre>

<p>This works: </p>

<pre><code>for(elem in car) {
  console.log(car[elem]);
}
</code></pre>

<p>But this doesn't work, returns undefined for every element: </p>

<pre><code>for(elem in car) {
  console.log(car.elem);
}
</code></pre>