PPK describes the this keyword as a reference to the owner of the function we are executing, or the object that a function is a method of. He then compares how attaching a function to an event in two different ways affects what the this keyword references.
Jonathan Snook demonstrates when JavaScript passes by reference or passes by value. Essentially, primitive types are passed by value, objects are passed by reference. Passing functions however, makes things look like a pass by value if the this
keyword is being used in the code. Snook offers workarounds to this by passing objects so that the context is correct, or using the call()
function to ensure the context is correct.
Christian Heilmann compares the Object Literal to Douglas Crockford's Module pattern and finds that the Module pattern fixes a major problem of the object literal - the difficult choice of using this or fully qualified references to functions in the same block. Christian also covers the improvements in the Module Pattern, like the decluttering of the return block, which makes the resulting a little easier to work with.
First in a series of talks from Douglas Crockford about the JavaScript language. These talks cover the JavaScript language, from the history, the language, advanced features, platforms, standards and programming style. Talks about inheritance, using functions to build objects, closures, as well as the basic JavaScript syntax. Also covers code conventions. JavaScript is a language that requires discipline.
Dustin Diaz discusses the Object Literal form of JavaScript, pointing out benefits such as better organisation of code in a namespace / wrapper.
Douglas Crockford discusses how to create private members and methods, and using privileged methods to bridge the gap between public and private. It also contains the simplest and most understandable definition of closures I've ever seen.