How can I test if a variable is set using typeof?
<p>Im trying to use typeof to determine whether or not a variable is undefined: </p>

<pre><code>function reset_textarea(reset) {

if (typeof(reset) != 'undefined') {
   ...do stuff
  }

}
</code></pre>

<p>Im calling it like this: </p>

<pre><code>reset_textarea('hello');
</code></pre>

<p>Its not working and I can't seem to figure out why. The function fires normally if I remove the if statement, thus - the issue seems to lie in the way I am testing whether or not the variable is set. Any idea what is going on?</p>
