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

Event.target vs Event.currentTarget

What is the difference between event.target and event.currentTarget?

Answer options

  • target points to the element that triggered the event, currentTarget to the element the listener is attached to
  • target is an older version of currentTarget
  • There is no difference
  • currentTarget points to a DOM element, target points to the Event object

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