Re: Selecting values in a selection box
Lee <REM0VElbspamtr ap@cox.net> writes:
[color=blue]
> If a variable contains multiple addressable values in an ordered
> sequence, it is an array. There is no requirement for arrays to
> be writable.[/color]
That is one defintion of "array", using the common definition of the
word, not the technical one.
If anybody talks abouts "arrays" in a discussion about a typed
language like Java, I would be surpriced if they meant something
except the language's array type.
Javascript is a less strict language. The array subscript notation can
be used on any object, as can the methods of the prototype, so the
only thing that makes arrays special are their magic length property.
So, I can see why some people would use the word "array" about objects
that only resemble an array. They should be aware that it is
potentially confuzing. When I read "array", I understand it as meaning
"instanceof Array", unless it is clear from the context that it's not.
(I.e., I agree with PointedEars, except for the way of saying it.)
/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html> 'Faith without
judgement merely degrades the spirit divine.'
Lee <REM0VElbspamtr ap@cox.net> writes:
[color=blue]
> If a variable contains multiple addressable values in an ordered
> sequence, it is an array. There is no requirement for arrays to
> be writable.[/color]
That is one defintion of "array", using the common definition of the
word, not the technical one.
If anybody talks abouts "arrays" in a discussion about a typed
language like Java, I would be surpriced if they meant something
except the language's array type.
Javascript is a less strict language. The array subscript notation can
be used on any object, as can the methods of the prototype, so the
only thing that makes arrays special are their magic length property.
So, I can see why some people would use the word "array" about objects
that only resemble an array. They should be aware that it is
potentially confuzing. When I read "array", I understand it as meaning
"instanceof Array", unless it is clear from the context that it's not.
(I.e., I agree with PointedEars, except for the way of saying it.)
/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html> 'Faith without
judgement merely degrades the spirit divine.'
Comment