title: Function runs automatically and can't call Javascript function
body: <p>A document contains script </p>
  
  <pre><code>$(document).ready(function() {
  
          $(function reset(){
              $("#select-result").empty().html("&amp;nbsp;");
              userInputSumm = 0;
              userInput = [];
              console.log('reser was executed!');
          });
  
          $("#reset").click(function() {
              reset;
              /* $("#select-result").empty().html("&amp;nbsp;");
              userInputSumm = 0;
              userInput = []; */
          });
  
      });
  </code></pre>
  
  <p>and in page html</p>
  
  <pre><code>&lt;p&gt;
      &lt;a href="#" id="reset"&gt;Reset all&lt;/a&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>The function reset executed on page load.</p>
  
  <ol>
  <li>How can I prevent it from executing on page load?</li>
  <li>When I press link <code>Reset all</code> the function <code>reset</code> does not work? Why?</li>
  </ol>