I saw this pattern recently
if(condition) { (function() { var foo = "bar"; // do somehing with foo })();}// no more foo
It looks a little bit like a hack, and I was wondering if the usage of this pattern is a good practice?
Aucun commentaire:
Enregistrer un commentaire