So I\'ve been reading through Javascript - The Good Parts and one thing that Crockford points out is the use weakness of global variables in Javascript, in such a way that if yo
Making it a global function is not the answer. Why wouldn't you do this? This keeps x out of the global namespace.
(function () { var x = 'meh'; alert(typeof x); //string })();