Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

What is event handling?

What is an event handler?

1 Answer

Steven Parker
Steven Parker
243,656 Points

The "handler" is a part of a program that responds to something happening (the "event").

An event could be clicking on a button, typing in an input box, time elapsing, moving the mouse, etc. The "handler" is the part of the program that does something because of the event happening.

This is a common functionality of JavaScript programs and you'll find it covered in several of the courses