ablock said:
Yes, i am aware of that...what i meant is that for...in was designed
for those objects that don't have an integer as their keys and
therefore are not 'associative'. I am fully aware that 'associative
arrays' in ECMAScript are actually objects. I do know how to program
object oriented ECMAScript.
Apparently you don't.
I have no idea what you're talking about...you are clearly taking a
big problem and making it a huge one.
Obviously you have no clue what I am talking about because you are lacking
basic knowledge.
I have an array (object) as follows: a = {'1' = 'something', '6' =
'something else'......
`a' is *not* assigned a reference to an Array object here.
It could be a reference to an Object object, initialized with an Object
literal, if the "inner" `=' would be replaced by `:'.
It could be a reference to an Array object, initialized with an Array
literal, if `{' and `}' were replaced by `[' and `]', respectively, and the
"inner" `=' were replaced by `,'.
Other than that, it is merely a big syntax error in ECMAScript
implementations, because strings are immutable and you are trying to assign
(`=') literally 'something' to a string (literal).
However, curly braces are part of the syntax for a Java array. So it may as
well be that you have asked in the wrong newsgroup. In that case, try one
of comp.lang.java.* instead. Or you have simply not understood that
JavaScript has nothing to do with Java but the first four characters.
Probably we'll never know.
Had you posted *some* code in the first place, this could have been
clarified right away.
Now it's true...I am using the Array object,
No, you are not. So far, you are not using anything.
when i could be using the Object object or any other object for that matter.
That's besides the point.
This is not a support forum. I post on Usenet whatever comment I deem
necessary regarding your article. And I found it necessary to point out
that you waste memory and (probably) run time, one cause of your not
understanding the very *basics* of the language but immodestly claiming
otherwise.
The point is that my object, let's call it hotdog for arguments
sake, has a method added to it, and i wish to transverse this through
for...in, so I repeat:
How boring.
This is the answer I should have received at the beginning of this
whole thing, so I wouldn't have wasted my time reading through the
whole message.
Probably not.
PointedEars