Click in order · JavaScript and TypeScript course · Module 8: Events and the DOM
Creating a Custom Event with Data
Arrange the code fragments to create a Custom Event 'dinoAlert' with a detail object:
Items to click
- CustomEvent(
- 'dinoAlert'
- , { detail: { zone: 'A' } }
- )
- new
You can check the correct answer by solving this task in the CodeWorlds game.