May 02, 2004 Re: A scoping operator | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | J C Calvarese wrote:
>
> I've got no beef with ECMA script or JavaScript in particular. As far as Microsoft's proprietary languages, I prefer VBScript to JScript because I'm more confortable with BASIC syntax and it has a "for each".
JavaScript has:
for (var key in array)
alert(key + " -> " + array[key]);
Which is essentially "for each". Works on associatives and arrays - which are essentially the same thing, mind you.
-[Unknown]
|
May 02, 2004 Re: A scoping operator | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | "J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:c71ts1$2qr7$1@digitaldaemon.com... > Phill wrote: > > >"J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:c71eva$228o$1@digitaldaemon.com... > > > > > >>Scott Egan wrote: > >> > >> > >> > >>>(I found the use of just the varible names in the with block a bit > >>> > >>> > >uncomfortable). > > > > > >>> > >>> > >>You've had to much VB. > >> > >> > >> > >Is that Victorian Bitter? or Visual Basic? > >Or both? > > > >Phill > > > > Doesn't matter, they both make you look stupid. I apologise, I just couldn't resist. > true true :o)) |
May 02, 2004 Re: A scoping operator | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets wrote: > J C Calvarese wrote: > >> >> I've got no beef with ECMA script or JavaScript in particular. As far as Microsoft's proprietary languages, I prefer VBScript to JScript because I'm more confortable with BASIC syntax and it has a "for each". > > > JavaScript has: > > for (var key in array) > alert(key + " -> " + array[key]); > > Which is essentially "for each". Works on associatives and arrays - which are essentially the same thing, mind you. > > -[Unknown] Thanks for the correction. -- Justin http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation