property URL.pathnameThe pathname property of the URL interface is a string that represents the path of the URL. ExamplesExample 1 const myURL = new URL('https://example.org/foo/bar'); console.log(myURL.pathname); // Logs "/foo/bar" Example 2 const myURL = new URL('https://example.org'); console.log(myURL.pathname); // Logs "/" TypestringSeehttps://developer.mozilla.org/docs/Web/API/URL/pathname