Question · JavaScript and TypeScript course · Module 8: Events and the DOM
Quiz: preventDefault()
What is the event.preventDefault() method used for?
Answer options
- Stops event propagation
- Creates a new event
- Stops the default browser behavior
- Removes the event listener
You can check the correct answer by solving this task in the CodeWorlds game.