I'm kind of new to JavaScript and I'm trying to learn how to properly use a namespace. I'm storing Windows to access them from any website file.
var myNamespace = myNamespace || {};
myNamespace.windows = [];
So anytime I open a new window I push it to the namespace array. I have It declared on a js file which I'm including on every html file, It works on my index.html but it doesn't on the other html files. How can I use the same variable across windows? Thanks.