-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
8, 11
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
nashorn> a = "A,B,C,D".split(",")
[object Array]
nashorn> Array.prototype.foo=function(){};
function(){}
nashorn> a
[object Array]
nashorn> for each(x in a) print (x)
A
B
C
D
function(){}
function() {} is not expected to be in the list of "elements" of the array.
nashorn> for (i in a) print( i)
0
1
2
3
foo
nashorn> for (i in a.length) print( i)
nashorn> for (i=0;i<a.length;i++) print( i)
0
1
2
3
nashorn> for (i=0;i<a.length;i++) print( a[i])
A
B
C
D
nashorn>
nashorn> a = "A,B,C,D".split(",")
[object Array]
nashorn> Array.prototype.foo=function(){};
function(){}
nashorn> a
[object Array]
nashorn> for each(x in a) print (x)
A
B
C
D
function(){}
function() {} is not expected to be in the list of "elements" of the array.
nashorn> for (i in a) print( i)
0
1
2
3
foo
nashorn> for (i in a.length) print( i)
nashorn> for (i=0;i<a.length;i++) print( i)
0
1
2
3
nashorn> for (i=0;i<a.length;i++) print( a[i])
A
B
C
D
nashorn>