1The window object is a global object that has the properties pertaining to the
2current DOM document, which is what's in the tab of a browser. The document
3property of the window object has the DOM document and associated nodes and
4methods that we can use to manipulate the DOM nodes and listen to events for
5each node.
6(Original Answer by Quaint Quelea, I just added linebreaks to make it readable)
1The window object is a global object that has the properties pertaining to the current DOM document, which is what's in the tab of a browser. The document property of the window object has the DOM document and associated nodes and methods that we can use to manipulate the DOM nodes and listen to events for each node.
1window //Any property of this is avalable globaly
2window.setInterval===setInterval//true
3var woke = "Woke, Man";
4woke===window.woke//true
5window.woke = "no mo woke";
6woke===window.woke//still true
1function getQueryStringValue (key) {
2 return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
3}
4
5// Would write the value of the QueryString-variable called name to the console
6console.log(getQueryStringValue("name"));
7