I've got this code working fine. But The delete()
function deletes all entries with the key
equal to "foo".
`let url = new URL("https://example.com?foo=1&bar=2");
let params = new URLSearchParams(url.search);
//Add a second foo parameter.
url.searchParams.append("foo", 4);
console.log(params.getAll("foo")); //Prints ["1","4"].
console.log(url)
url.searchParams.delete("foo", 4);
console.log(url)`
The goal is to delete only one of entry (foo=4) and