WebURLURL.pathnameproperty URL.pathnameThe pathname property of the URL interface is a string that represents the path of the URL. Examples ##Example 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 "/" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/pathname
property URL.pathnameThe pathname property of the URL interface is a string that represents the path of the URL. Examples ##Example 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 "/" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/pathname