javascript
beginner
हल किया
2026-11-17 को समाप्त
Parse a query string
Write parseQuery(qs) that turns a URL query string into an object, without URLSearchParams.
- A leading
?is optional:"?page=2&q=flask"gives{ page: "2", q: "flask" }. - Values are URL-decoded, and
+means a space. - A key that appears more than once gives an array of values, in order.
- A key without
=gets an empty string.
Acceptance criteria
- An empty string gives
{}. - The tests at the bottom print
All tests passed.
अब तक 0 लोगों ने हल किया।
एडिटरCtrl + Enter
जब टेस्ट "All tests passed" दिखाते हैं, तो चैलेंज इस ब्राउज़र में हल के रूप में चिह्नित हो जाता है।
अपना समाधान समीक्षा के लिए भेजें