Extract the domain name from a URL - JavaScript Codewars Challenge

preview_player
Показать описание
This was super fun! To think, if I only waited one more day, I could've solved it even faster!

Group Chats:

You can contact me on:

Shop:
Buy a Windows application here:

Any suggestions? Leave it in the comment section or contact me somewhere else!

Thank you for watching!

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

What would this script look like in Python?

lancemarchetti
Автор

I solved it by URL api. It works in Node and Firefox but not in codewars. I think, codewars doesn't support URL api.

var constructURL = new URL(url);
var generatedDomain = constructURL.hostname;
return + 1,

abirsheikh
visit shbcf.ru