WebURLURL.portproperty URL.portThe port property of the URL interface is a string that represents the port of the URL if an explicit port has been specified in the URL. Examples ##const myURL = new URL('https://example.org:8080/foo'); console.log(myURL.port); // Logs "8080" #const myURL = new URL('https://example.org/foo'); console.log(myURL.port); // Logs "" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/port
property URL.portThe port property of the URL interface is a string that represents the port of the URL if an explicit port has been specified in the URL. Examples ##const myURL = new URL('https://example.org:8080/foo'); console.log(myURL.port); // Logs "8080" #const myURL = new URL('https://example.org/foo'); console.log(myURL.port); // Logs "" Type #stringSee #https://developer.mozilla.org/docs/Web/API/URL/port