What is the difference between these two javascript functions?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/114525/the-difference-between-the-two-functions-function-x-vs-var-x-function">The difference between the two functions? (&ldquo;function x&rdquo; vs &ldquo;var x = function&rdquo;)</a><br>
  <a href="http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname">JavaScript: var functionName = function() {} vs function functionName() {}</a>  </p>
</blockquote>



<pre><code>var test = function() {
    var a = 20;
    var b = 30;

    return a + b;
};

function Add() {
    var a = 20;
    var b = 30;

    return a + b;
}
</code></pre>

<p>Can you explain the difference between these two functions? If I call add() or test() they both give me the same result. I'm unsure what exactly the var does?</p>
