Now the first step in getting this data to the server is figuring out where it lives; this actually lives in the location object. We're going to use the console to just play around with it.
The location is a global object that's provided by your browser, and on it we have a whole bunch of really interesting things like host, hostname, href, origin, and pathname. What we're going to be using is search.
As you can see in the following screenshot, search is the query string, everything from the question mark to the end of the word course, what I have highlighted here:

The goal is to get this into a more useful format. Right now we have just the string, we're going to need to parse this. We're actually going to use a library to do that now that we know where it lives. We can access window.location.search to get this value:

I'm adding window upfront the location.search just to make sure we're accessing the global location property as opposed to a local variable, which may or may not exist called location. This is going to be the most foolproof way to fetch the query string.