Put in order · JavaScript and TypeScript course · Module 8: Events and the DOM

event.preventDefault() Syntax

Arrange the elements for preventing the default action in an event handler:

Items to put in order

  • event.preventDefault()
  • }
  • function handleSubmit(
  • event) {

You can check the correct answer by solving this task in the CodeWorlds game.