Categories
javascript

Javascript function invocation using square brackets

This one caught me by surprise. Thinking about it, it makes sense. Basic functions Consider the object: When we try x.getFoo() we see “Hello World”. Consider: In this case the result is undefined. The function does not have the right value of “this”. We can work around: Access using array notation I recently saw something […]