const p = new URLSearchParams('a=1')
p.has('a') // β true
p.has('z') // β falsehas() checks whether a given key exists in the parameters.
params.has(name) returns true if the key exists, false otherwise.
Challenge: Use has() to check for key presence.