How to write 'for-in' in JavaScript ?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11808758/functional-approach-to-basic-array-construction">Functional approach to basic array construction</a>  </p>
</blockquote>



<p>I am new to js. I just want to know which one is the right approach. Below I have posted my code.</p>

<pre><code>var doubles = (i*20 for (i in it));
var doubles ={i*20 for (i in it)};
</code></pre>

<p>Thanks</p>
