y common examples of this error are those that
refer to native environment objects:</p>
<ul>
<li>"'document' was used before it was defined"</li>
<li>"'window' was used before it was defined"</li>
<li>"'alert' was used before it was defined"</li>
<li>"'console' was used before it was defined"</li>
<li>"'require' was used before it was defined"</li>
</ul>
<p>In the following example we attempt to set the value of the undeclared variable
<code>x</code> and then attempt to use some native browser environment o