Alert a variable returns 'undefined' : <p>For some reason I can't seem to alert the value of a variable, my variable is global and defined at the top of the page...</p>

<pre><code>var slickTog = 'dsadsdasd';
</code></pre>

<p>I then have a window resize function that I have the alert in only it doesn't work!</p>

<pre><code>function windowSize(){
    alert(slickTog);
    ...
}

windowSize();

$(window).on('resize',function(){
    windowSize();
});
</code></pre>

<p>Does anybody have an idea of why this isnt working? I've attached a jsFiddle too...</p>

<p><a href="https://jsfiddle.net/7024manL/" rel="nofollow">https://jsfiddle.net/7024manL/</a></p>
