WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 JavaScript Structs, Martin Walter, June 13, 2004
     Re:JavaScript Structs, Erik Arvidsson, June 13, 2004
         Re:JavaScript Structs, s, August 25, 2004

Subject: Re:JavaScript Structs From: s Date: August 25, 2004

in your for in, i is just the index into the array/object/function/dictionary

replace alert(i)

with alert(Images[i])

From: Erik Arvidsson
Sent: June 13, 2004
Subject: Re:JavaScript Structs

That is just object literals. The following are the same:

var obj = new Object;
obj.a = "foo";
obj.b = "bar";


var obj = {
a : "foo",
b : "bar"

The for in loop iterates over the enumarable properties/fields in an object.



Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX