If I have two separate scripts in an HTML page with JavaScript are the variables shared between the entire page? Or only within their own declarations?
The window holds all variables. All scripts are in the mother window object. So all variables are in one space. They can, however, be localized to functions, etc.