Closed Bug 24229 Opened 25 years ago Closed 25 years ago

trying to use Array as prototype doesn't change the length property

Categories

(Rhino Graveyard :: Core, defect, P3)

x86
Windows 98
defect

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: martin.honnen, Assigned: norrisboyd)

Details

I am trying to use Array as the prototype for another constructor function but the length of objects is not incremented js> function Dictionary (obj) { for (var p in obj) { print (p + ': ' + this.length + '\n'); this[this.length] = obj[p]; this[p] = obj[p]; } } js> js> Dictionary.prototype = new Array(); js> var d = new Dictionary ({Netscape: 'JavaScript', Microsoft: 'JScript'}); Microsoft: 0 Netscape: 0 js>
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Current behavior is correct. See comments on bug 24233.
This is a javascript question and is a duplicate of bug 24233 marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.