The raw search string still has the question mark and the key attached.
Acceptance criteria
- 1.#out should show just the id.
The raw search string still has the question mark and the key attached.
const url = new URL("https://example.com/products?id=42"); document.querySelector('#out').textContent = url.search === "42" ? "just the id" : "still has ?id=";
Output ready when you are
Press Run to render your code, or Submit to validate your solution.