Daily Challenge (246 Part Series)
Write a function that, when given a URL as a string, returns only the domain name as a string.
domainName(https://twitter.com/explore) == "twitter" domainName(https://github.com/thepracticaldev/dev.to) == "github" domainName(https://www.youtube.com) == "youtube"
Want to propose a challenge idea for a future post? Email email@example.com with your suggestions!