Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Add Event Listener
Easy
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Add an event listener to a DOM element.
Sample Input:
"button", "click"
Sample Output:
function
Hints
Hint 1
Use addEventListener() method
Hint 2
Pass event type and callback function
Hint 3
Return the event handler function
Code Editor
Reset
Run
Save
Loading...