Javascript: is using 'var' to declare variables optional?
<p>Is "var" optional?</p>

<pre><code>myObj = 1;
</code></pre>

<p>same as ?</p>

<pre><code>var myObj = 1;
</code></pre>

<p>I found they both work from my test, I assume var is optional? </p>
