Does javascript still allocate memory for the "IF" scenario if the condition evaluates to false?
<p>Soooooooooooooooo... </p>

<p>I have an IF statement that nowadays will evaluate to true 99.7% of the time, which consists of a check to see if the browser is DOM 1+ capable, and then load a big block of code.</p>

<p>So it's logical to put an "if (true)", and omit the "else" part, but i wonder if the older browsers will still continue to parse the code and allocate memory, before finally deciding to break execution....</p>

<p>Not that i care at this point, since we've had decent browsers for 10+ years now, but for future reference, i hope somebody knows.</p>

<p>I guess my question is more or less this: does the browser <b>parse the whole file</b> and allocate memory before executing the first conditional statement, which is the first thing before anything else?</p>

<p>Thanks in advance :)</p>
