javascript noob Q - set global variables for current page

Pat,

With JavaScript, the global scope is the complete JavaScript environment.  In HTML, the global scope is the window object: All global variables belong to the window object.  So you could do something like this

var isDude = ‘Pat’;
alert(window.isDude);

-or-

if (!window.isDude) { window.isDude = 'Pat; }

Best practice is to not use global variables.

I am not a JavaScript developer so nothing said or written comes with an expressed warranty.

google-bing for lots of details and opinions.

Irvin