What's the recommended idiom for iterating over the elements of an
array? I had been using:
for (var i = 0; i !== v.length; i += 1) {
var element = v[+i];
...
}
Are you expecting array iteration to be done as:
for (var i = 0; i !== v.length; i += 1) {
var element = ADSAFE.get(v, i);
...
}
This is a little cumbersome.
I'm looking for something that will work reliably across browsers,
including IE6.
Could JSLint be made smart enough to realize that the variable "i" in
the above loop is always a positive number?
--Tyler
On Fri, Jul 31, 2009 at 9:20 AM, Douglas Crockford<douglas@...> wrote:
> The ADsafe verifier now rejects programs that use the arguments pseudo array.
>
> The ADsafe verifier now rejects programs that use expressions with the
subscript operator, even when the + prefix is used. The ADSAFE.get and
ADSAFE.set methods must be used instead. The subscript operator may be used with
positive number literals and string literals that do not begin with - or _.
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
--
"Waterken News: Capability security on the Web"
http://waterken.sourceforge.net/recent.html