I was revising some concept in jquery then I found a simple code which I understood properly but there is "event" passed in that function and I didn't understand why is it passed because we could achieve that functionality without it.
var hiddenBox = $( "#banner-message" );
$( "#button-container button" ).on( "click", function( event ) {
hiddenBox.show();
});
In above code I want to know why event is passed in this function? Also what better we can do with this. If possible please also provide an example.
Thanks