property URL.usernameThe username property of the URL interface is a string that represents the username of the URL. ExamplesExample 1 const myURL = new URL('https://someone:somepassword@example.org/baz'); console.log(myURL.username); // Logs "someone" TypestringSeehttps://developer.mozilla.org/docs/Web/API/URL/username