Montag, 24. Mai 2010

Pitfall

This is an easy pitfall to make:


(function(){
var Object = Object;

})();

Object ends up undefined. So, a fix for that would be:


(function(){
Var Object = window.Object;

})();


But it is slower than this:


(function(){
var O = Object;

})();


another obvious working Pattern is


(function(Object){

})(Object);


MfG Kambfhase

Keine Kommentare:

Kommentar veröffentlichen