title: Different function declarations
body: <p>I was told that you can declare functions in JavaScript more than 1 way.
  ex.</p>
  
  <pre><code>// One way
  function sqrt(x){
     return x * x;
  }
  
  // Second way
  var sqrtAlt = function (x){
     return x * x;
  }
  </code></pre>
  
  <ul>
  <li>What is the difference between these two function declarations? </li>
  <li>The output is same but must have a reason to have two ways? </li>
  <li>I am also curious about how you would use them. </li>
  <li>Lastly, are there any other ways? </li>
  </ul>
  
  <p>Thanks.</p>