CodeWars || Extract the domain name from a URL || JavaScript || Code Challenge

preview_player
Показать описание
Write a function that when given a URL as a string, parses out just the domain name and returns it as a string. For example:

Рекомендации по теме
Комментарии
Автор

thank you! it was really helpful, and the code is short, worked for me )

XM
Автор

Спасибо автору канала большое, около 3 часов бился над этой катой. Хотелось бы только на русском языке послушать, тк английский еще слабоват.

СергейГаврильчик-тж
Автор

у меня все тоже самое только только ретурн другой
return url.substring(0, url.indexOf('.'))

mrcrueloneman
Автор

а блин, я думал будет решение регулярными выражениями

Boobnovslava
Автор

I did the same thing, but unfortunately it fails the 'Attempt'.

karlfrick
welcome to shbcf.ru