This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25455 - length of associative array is 0
Summary: length of associative array is 0
Status: RESOLVED INVALID
Alias: None
Product: WHATWG
Classification: Unclassified
Component: JavaScript (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: Unsorted
Assignee: Mathias Bynens
QA Contact: sideshowbarker+javascript
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-25 01:00 UTC by Jim Michaels
Modified: 2014-06-21 12:54 UTC (History)
1 user (show)

See Also:


Attachments

Description Jim Michaels 2014-04-25 01:00:05 UTC
<p>Array.length result (value): <span id='al'></span></p>
<script>
var associative_array_String = new Array();
associative_array_String["one"] = "Lorem";
associative_array_String["two"] ="Ipsum";
associative_array_String["three"] = "dolor";
document.getElementById('al').innerHTML=associative_array_String.length;
//result is 0
</script>
Comment 1 Mathias Bynens 2014-06-21 12:54:37 UTC
This is outside the scope of the JavaScript / Web ECMAScript spec. See <http://javascript.spec.whatwg.org/#goals>.

To propose changes to the ECMAScript language, please file a bug on https://bugs.ecmascript.org/.