How can you create HashMap in ExtJS ?
It represents a collection of a set of key and value pairs. Each key in the HashMap must be unique, the same key cannot exist twice. Access to items is provided via the key only.
Sample usage:
var map = new Ext.util.HashMap();
map.add('key1', 1);
map.add('key2', 2);
map.add('key3', 3);
map.each(function(key, value, length){
console.log(key, value, length);
});
The HashMap is an unordered class, there is no guarantee when iterating over the items that they will be in any particular order. If this is required, then use a Ext.util.MixedCollection.
Comments
Post a Comment