method URLSearchParams.hasURLSearchParams.has(name: string,value?: string,): booleanDeprecatedReturns a boolean value indicating if a given parameter, or parameter and value pair, exists. searchParams.has('name'); searchParams.has('name', 'value'); Parametersname: stringoptionalvalue: stringReturn Typeboolean