jquery - function without parameter as it behaves default whatever we put in it or not -


this jquery

$( document ).ready(function() {      $( "a" ).click(function( event ) {          alert( "hi!" );          event.preventdefault();      });  }); 

within function event parameter replace whatever , whatever.preventdefault() know without inserting parameter function() .preventdefault(); work?

no, code can't work if don't specify parameter function because method can't applied nothing.


Comments