VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-urlsearchparams-has-method/

⇱ Node.js URLSearchParams.has() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js URLSearchParams.has() Method

Last Updated : 11 Jul, 2025
In URLSearchParams interface, the has() method returns a Boolean which tells us that if the parameter with input name exists it will return true, else false. Syntax:
var Bool = URLSearchParams.has(name)
Returns: True - if name present, else it will return False. Parameters: name - Input the name of the parameter. Example1: Output:
true
Example2: When input parameter is not present Output:
false
Supported Browsers:
  • Google Chrome
  • IE
  • Edge
  • Opera
  • Apple Safari
Comment
Article Tags:
Article Tags:

Explore