links for 2006-07-31
-
News group for home / small business video editors.
-
Linux users are friendly, and like to help you install Linux!
« June 2006 | Main | August 2006 »
I am writing a shopping cart controller in JavaScript and CSS for the last few days. It's rather complex, and tonight I found I had written this debugging statement:
alert((function(){var a=""; for(var i in controller){a+=i+" : "+controller[i];return a;}})());
which I quickly realized should be amended to
alert((function(){var a=''; for(var i in controller){a+=i+" : "+controller[i];}return a;})());
which then became
alert((function(){var a=''; for(var i in controller){a+="\n"+i+" : "+controller[i];}return a;})());and finally in exasperation,
alert((function(){var a=''; for(var i in controller){a+="\n"+i+" : ";}return a;})());