5) learn to depend on firebug. its an extension to firefox as a plugin and even though safari 4 beta , ie8, and opera 10 all have built-in debugging environments, firebug is still the best. i have a feeling it will be built into firefox soon too. you can inspect the live dom, any elements compiled css hierarchy ( including showing what was overrided based on weight of selector ), network activity including headers of ajax calls and responses, dom properties of seleted elements, a logging hook, a full-fledged (better-than-visual-studio-by-miles ide for debugging step-by-step if you need to) etc....
http://getfirebug.com/ On Wed, May 6, 2009 at 6:13 PM, kiusau <kiu...@mac.com> wrote: > > On May 6, 10:34 am, dhtml <dhtmlkitc...@gmail.com> wrote: > > > var time = new (function(x){ > > this.timeStamp = +new Date; > > this.end = new Date(x); // Invalid Date. > > })(Infinity); > > How do you explain that both time.timeStamp and time.end are returned > without error in the following: > > var time = new (function(x){ > this.timeStamp = + new Date; > this.end = new Date(x); // Invalid Date. > })(1241646503107); > alert(time.timeStamp); > alert(time.end); > > but the following results when no integer is entered: > > 1) (time) // invalid date, with no error > 2) () // invalid date with no error > 3) (time.timeStamp) // error > 4) (time()) // error > > REFERENCE: > http://homepage.mac.com/moogoonghwa/practice/JavaScript/js_parentheticalOperator.html > > > > -- Christopher Thatcher