Hapus Properti dari Query String JavaScript

const params = new URLSearchParams(location.search)
params.delete('key_to_delete')
console.log(params.toString())
Puzzled Penguin