DEV Community 👩‍💻👨‍💻

Discussion on: Daily Challenge #89 - Extract domain name from URL

Collapse
ap13p profile image
Afief S

Oneline with javascript

const domainName = d => new URL(d).hostname.split(".").shift()