Explain the use of the event.preventDefault() method.

bookmark

The event.preventDefault() method is used to prevent the default action of an event from occurring.