port
URL: port
From MDN: "The port property of the URL interface is a string containing the port number of the URL."
Notes & further reading
Spec: URL Standard
MDN: URL.port
Example value:
// for a standard port:
const url = new URL("https://elide.dev/?one=two#hello");
url.port;
← 443
// for a non-standard port:
const url = new URL("https://elide.dev:123/?one=two#hello");
url.port;
← 123
Content copied to clipboard