logo
logo

Log Event Type

Beginner

Log Event Type

Write a function called
logEventType
that adds a click event listener to a given element and logs the type property of the event object to the console when the button is clicked.

Console
Submit
Solution
00:00