Context is related to objects. It refers to the object within which a function is executed.
When you use the
new keyword in front of a function call, the context is the new
When you execute a
.apply, the context is the first argument.
Function is called as object property (like
obj.fn) then is executed in the context of the
If any of this rules don’t match with your case, the
Function is executed in the global context.
Each function creates a scope, and the only way to create an scope is defining a
The life cycle of an variable exists in the most external scope that the variable has been assigned.
Out of his scope, a variable is invisible.
Read in the CoffeeScript Book by Javi JimÃ©nez.
Quotes from Kevin Chisholm blog.