JavaScript Window location.pathname
JavaScript Window location.pathname
The location.pathname property is used to either set or return the pathname of a URL i.e, page.
Syntax:-
Its syntax is:- location.pathname OR location.pathname = path
Return:-
Its return is:- string containing current pathname
Further Explanation:-
Parameter | Description |
path | The pathname of the URL. |