In Chapter 9, WTFudge Is Going On?: Troubleshooting MooTools, a discussion of variable type reporting led us to an instance where we could not properly return the type of an undeclared variable. This oddity has its roots in the fact that undefined, undeclared variables cannot be dereferenced during a function call.
In short, undeclared variables can not be used as arguments to a function.
Get ready to see how we can still extend MooTools'
typeOf function by passing a missing variable using the global scope:
// will throw a ReferenceError myfunction(oops_var); // will not throw a ReferenceError myfunction(window.oops_var);
typeOf function with a new method and call ...