NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
javascript for/in (Score:1)
For an array, for/in iterates over indices. Weird, but fine. It's a fair shorthand for a three-part for. The problem is with Array-like objects like, say, nodeList. A node list is supposed to act just like an Array, but for/in will iterate over a nodeList's attributes, not its elements. Argh! JS needs real iterators.
rjbs
Reply to This
Re:javascript for/in (Score:1)
You could give nodeList'd prototype a different method which does the right thing there. (Not that I've tested - actually, if nodeList is a native code object then adding a javascript prototype method might not do anything at
osfameron