Daily Challenge (159 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 firstname.lastname@example.org with your suggestions!