Javascript implied global

I wouldn't do this anyway but I have just read that

var a = b = 0;

would mean that b is made a global. Because of the right to left evaluation the b = 0 would be evaluated as an implied global. How fiendish....

I'm not sure what sort of person would do this though...


Popular posts from this blog

Follow on from home automation post

Derbyshire Dot Net Talk - Writing Robust Systems

Functional Filtering in Javascript