Practice · 2 of 3
Action Router
CHALLENGE
Difficulty: intermediate+25 XP
Write handleClick(event, root, actions): resolve the actionable element as in resolveAction, read el.dataset.action, and call actions[action](el) when the handler exists. RETURN the action name that was dispatched, null when nothing matched, and "missing" when the element matched but actions has no handler for it. actions must never be mutated.
Press Submit to check your solution.
Back to lesson: Practice: Event Delegation — Practice