Skip to content
Daniel Gimenez edited this page Jul 25, 2013 · 11 revisions

The performance of using object literals as associative arrays is poor. If performance is an issue, use this class to create associative arrays instead.

Constructor

The constructor has one optional parameter, initalKeyValueArray. This can either by of the type dgAssociativeArray or of the type Array. If it is an array, each element should be an object with the properties key and value.

Properties

The following are intended to be read only properties.

  • values: an array of all values for the instance
  • keys: an array of all keys for the instance.
  • length: number of items for the instance.

Clone this wiki locally