WebURLURL.hashproperty URL.hashThe hash property of the URL interface is a string that starts with a # and is followed by the fragment identifier of the URL. It returns an empty string if the URL does not contain a fragment identifier. Examples ##Example 1 const myURL = new URL('https://example.org/foo#bar'); console.log(myURL.hash); // Logs "#bar" #Example 2 const myURL = new URL('https://example.org'); console.log(myURL.hash); // Logs "" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/hash
property URL.hashThe hash property of the URL interface is a string that starts with a # and is followed by the fragment identifier of the URL. It returns an empty string if the URL does not contain a fragment identifier. Examples ##Example 1 const myURL = new URL('https://example.org/foo#bar'); console.log(myURL.hash); // Logs "#bar" #Example 2 const myURL = new URL('https://example.org'); console.log(myURL.hash); // Logs "" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/hash