How to Obtain the URL of a Web Page

The code to obtain the URL of the current web page that a user is on is:

To display it out to the output screen, we would use the document.write() function, using the following line:

If we use the above line with this current page, we will get the following output: