Web APIs & Utilities

Parse URL Query String

mediumJS SpecificJS / TS3 tests

Problem Statement

Implement `parseQueryString(queryString)` that parses a URL search query string into a structured object with decoded values. Repeated keys or bracket notation (`tag=js&tag=ts`) should parse into arrays.

Examples

Example 1:
parseQueryString('?name=John%20Doe&age=30'); // { name: 'John Doe', age: '30' }

Example 2:
parseQueryString('tag=js&tag=react'); // { tag: ['js', 'react'] }
JavaScript & TypeScript starter code included
Run this as a live interview

Practice solo

3 test cases. No second person needed.

Get new interview exercises

Practice problems and review drills, sent when we publish new ones. No spam.

Unsubscribe anytime. We never share your address.