The search property is used to return the querystring part of a URL. It also includes the question mark (?). We can also use it to set the querystring of a URL.
Its syntax is:- location.search OR location.search = querystring
Its return is:- a string containing querystring part of URL including a question mark (?)
|querystring||The querystring part of the URL|