What happens in the execution context when this script is executed
<p>When i execute the following script the alert statement is printing the function why is it so?
What happens in the execution context? Why the variable basicPattern's undefined value is not printing?</p>

<pre><code> function basicPattern(){
    var o = 5;

    return o;
 }

 var basicPattern;
 console.log(basicPattern);
</code></pre>
