this value in JavaScript anonymous function
Inside of your anonymous function this is the global object. Inside of test, this is the instance of MyObject on which the method was invoked. Whenever you call a function like this: somceFunction(); // called function invocation this is always the global object, or undefined in strict mode (unless someFunction was created with bind** — … Read more