What object are Javascript global variables stored in?

Viewed 10415

Are global variables stored in specific object? For instance:

var test="stuff";
console.log(window.test);
console.log(document.test);
console.log(this.test);

All three of these tests result in undefined, so is there an object that holds these variables?

I feel as though this is something stupid that I should already know, but I can't even seem to find the answer online.

4 Answers
Related