L
listerofsmeg01
Newbie here again,
I was wondering if Javascript supported enumerations, so a quick search
in this group turned up the following code:
var eColors = new {red:0, yellow:1, green:2, blue:3};
This works just fine, but I was intrigued as to what is actually going
on here. Obviously an array called eColors is being created, but I
don't understand the ":" notation on the array elements. What exactly
does this do?
Many thanks
I was wondering if Javascript supported enumerations, so a quick search
in this group turned up the following code:
var eColors = new {red:0, yellow:1, green:2, blue:3};
This works just fine, but I was intrigued as to what is actually going
on here. Obviously an array called eColors is being created, but I
don't understand the ":" notation on the array elements. What exactly
does this do?
Many thanks