React to clicks, typing, and more.
const btn = document.querySelector('button'); btn.addEventListener('click', () => alert('Hi!'));