Question · JavaScript and TypeScript course · Module 8: Events and the DOM

The detail property

What is the detail property of a CustomEvent used for?

Answer options

  • Passes arbitrary data (objects, arrays, numbers) to the event listener
  • Sets the element's background color
  • Sets the event's delay time
  • Stores the name of a CSS file

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