Jetpack/Collections: Difference between revisions

Jump to navigation Jump to search
m
Line 107: Line 107:
== KeyValueCollection ==
== KeyValueCollection ==


A collection where entries have a key (or label or index).
A collection where entries have a key or label or index.


Examples of subclasses: Array (key = index), Map
Examples of subclasses: Array (key = index), Map


   * Sets the value for |key|
   * Sets the value for |key|
   * @param key {Integer}
   * @param key
   set : function(key, item)
   set : function(key, item)
    
    
   * Gets the value for |key|
   * Gets the value for |key|
   * If the key doesn't exist, returns |undefined|.
   * If the key doesn't exist, returns |undefined|.
   * @param key {Integer}
   * @param key
   get : function(key)
   get : function(key)
    
    
Confirmed users
596

edits

Navigation menu