Main

September 11, 2006

Neat little example of a useful JavaScript closure

I just picked up the 5th edition of David Flanagan's JavaScript, the Definitive Guide. I find it amusing that that book is the only JavaScript book officially recommended at comp.lang.javascript.

Continue reading "Neat little example of a useful JavaScript closure" »

June 06, 2006

Set a nested DOM property with Javascript, using square bracket notation

In the comp.lang.javascript Javascript Best Practices document, I came across an interesting discussion of the reasons for preferring square bracket notation to eval().

The consensus seems to be that eval is evil, and that "if it exists in your page, there is almost always a more correct way to accomplish what you are doing."

Continue reading "Set a nested DOM property with Javascript, using square bracket notation" »