var url = new URL("http://localhost:3000/product?product=4"); alert(url.searchParams.get("product"));