Closed Bug 355602 Opened 18 years ago Closed 18 years ago

elided array elements should not be defined

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 260106

People

(Reporter: sync2d, Unassigned)

Details

http://bclary.com/2004/11/07/ecma-262.html#a-11.1.4 11.1.4 Array Initialiser | Array elements may be elided at the beginning, middle or end of the | element list. Whenever a comma in the element list is not preceded | by an AssignmentExpression (i. e., a comma at the beginning or after | another comma), the missing array element contributes to the length | of the Array and increases the index of subsequent elements. | Elided array elements are not defined. $ cat array-initialiser-hole.txt var exp = false, act = [,].hasOwnProperty("0"); print("expect: " + exp); print("actual: " + act); $ dbg.obj/js array-initialiser-hole.txt expect: false actual: true
*** This bug has been marked as a duplicate of 260106 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.