3 Stops callback execution and returns immediately when called.
The preventDefault() method cancels the event if it is cancellable, meaning it prevents the default action that belongs to the event to occur.
The benefit to using event.preventDefault() is that you can add this as the first line in the handler, thereby guaranteeing that the anchor's default behavior will not fire, regardless if the last line of the function is not reached (eg. runtime error) which is not the case .lets assume of return false If your click handler uses return false to prevent browser navigation, it opens the possibility that the interpreter will not reach the return statement and the browser will proceed to execute the anchor tag's default behavior.
return false example.