Closed bakkot closed 1 year ago
let url = new URL('https://example.com:443'); console.log(url.port); // empty string, because it's the default for the protocol console.log(url.protocol); // 'https:' - note the colon, which was missing in the logic below