javascript - Overwriting the Array constructor does not affect [], right? -


I just read it:

I was under this assumption The effect of that overwriting object or array was then when you array / object , but according to that article, its literal creation ( {} and [] ) ...

My argument:

  array = function () {alerts ('hi') ; }; [1,2,3,4,5]; ([1,2,3,4,5]); Var a = [1,2,3,4,5]; // ... // ... nothing is not cautious  

So, am I being mad or do I have some implementation-specific quirks?

But to really answer your question, yes, object and Array Constructors are also applied to literal compositions OK browsers kept them only (and others) stable so that they can not be overridden by custom scripts.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -