Premium

Selector Polyfill 1: Implement `matchesSimple`

By FrontendAtlas Team · Updated Jan 31, 2026

Implement matchesSimple(node, selector) — a tiny subset of Element.matches(). This is extremely common in frontend interviews because it underpins event delegation and DOM utilities. Node shape (DOM-like, not real DOM): - tagName: string (case-insensitive) - id?: string - className?: string (space-separated classes) Selector support (single…

Challenge preview

Selector Polyfill 1: Implement matchesSimple: Implement matchesSimple(node, selector) — a tiny subset of Element.matches(). This is extremely common in frontend interviews because it underpins event delegation and DOM utilities.…. Expect dom and selectors decisions under easy level constraints.

Premium unlocks

  • Full editor workflow with starter files, tests, and solution context.
  • Edge cases, common mistakes, and complexity notes for the interview discussion.
  • Progress tracking once you unlock and complete the challenge.

Free warm-up options

Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.