Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
this doesn't work with website domains with like wowww dot com. I feel it's necessary to just go with startswith checks which is a lot safer practice.
This breaks if the tld isn't www, which is extremely common.
I skipped mine because I couldn't get regex to work on it. This is a much more elegant solution. Good stuff!
nice bruh
wow, so clever
Doesn't work with the url like:
http://cooooowww.com
Last replace should contain position check, something like:
if (url.indexOf('www.') == 0) url = url.replace("www.", '');
This won't work if the url provided has a subdomain e.g domainName("https://www.subdomin.domain.com/awdawda?zzz=123&user=momo") will return subdomin
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
What was the hack?
replace crossed my mind for a second, nicely done!
Nice one!
arghh, why didn't I think of replace haha
this is "the perfection" in a code
Good solution and faster
Loading more items...