A function does not work : A document contains script 

    $(document).ready(function() {
    		
    		$(function reset(){
    			$("#select-result").empty().html("&nbsp;");
    			userInputSumm = 0;
    			userInput = [];
    			console.log('reser was executed!');
    		});
    		
    		$("#reset").click(function() {
    			reset;
    			/* $("#select-result").empty().html("&nbsp;");
    			userInputSumm = 0;
    			userInput = []; */
    		});
    		
    	});

and in page html

    <p>
    	<a href="#" id="reset">Reset all</a>
    </p>

The function reset executed on page load. 
1)How can I prevent it from executed on page load?
2)When I press link `Reset all` the function `reset` does not work? Why?
