After reading the John Resig article on overriding globals in the browser, I attempted to replicate the code in my own browser. However, to my surprise, nothing happened when I ran the example.
Here is the code snippet:
var sec = {};
function Array() {
alert(1);
sec = this;
};
Even when I executed ["zdxc", "sd", 1111, 11.1]
in the browser console, no alert was displayed and it seemed like the Array declaration had no effect.
I'm wondering if this issue has been fixed in modern browsers or if it still works in certain versions of browsers. Any insights?