You will write three small functions that take a URL apart, as the lesson did.
Your tasks.
protocol, return the part of the URL before ://.domain, return the domain name: the part after :// and before the first / that follows it. If there is no /, return everything after ://.page, return the web page or file name: the part after that first /. If there is none, return an empty string "".Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…