Open this example in the interactive library
Source code
import { URLSearchParams } from "node:url";
console.log(
(() => {
const p = new URLSearchParams("a=1&a=2");
p.delete("a", "1");
return p.toString();
})(),
);
Sample output
a=2

Open this example in the interactive library
import { URLSearchParams } from "node:url";
console.log(
(() => {
const p = new URLSearchParams("a=1&a=2");
p.delete("a", "1");
return p.toString();
})(),
);
a=2