const et = new EventTarget()
let count = 0
et.addEventListener('inc', () => count++, { once: true })
et.dispatchEvent(new Event('inc'))
et.dispatchEvent(new Event('inc'))
count // β 1Use { once: true } to automatically remove the listener after its first invocation.
dispatchEvent returns true unless the event is cancelable and preventDefault() was called.
Challenge: Verify that dispatchEvent returns true when a listener is registered.