URL

A URL (Uniform Resource Locator) is a reference or address used to access resources on the internet. It specifies the location of a resource as well as the protocol used to retrieve it.

A URL consists of several components, including the protocol, domain name, port (optional), path, query string (optional), and fragment (optional). Each part provides specific information about how to access the resource.

Example: Here is an example of a URL and its components, followed by how to work with URLs in JavaScript:

https://www.example.com:8080/path/to/resource?query=example#fragment