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)
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>
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Comment 2•24 years ago
|
||
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.
Description
•