August 18, 2008

javascript annoyance

Type Array in JavaScript needs to be defined. A two dimensional array requires each secondary dimension to be defined as well. That means you need to do a new Array() for each element in the first dimension. While there are plenty of examples showing you how to do this with a for loop; that's still a pain.

I hope some future version of ECMA(the basis for javascript) 'fixes' this. Though I'm not going to be holding my breath.

No comments: