Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript hashmap equivalent

// JavaScript hashmap equivalent
var key = function(obj){
  // Some unique object-dependent key
  return obj.totallyUniqueEmployeeIdKey; // Just an example
};

var dict = {};

dict[key(obj1)] = obj1;
dict[key(obj2)] = obj2;
 
PREVIOUS NEXT
Tagged: #javascript #hashmap #equivalent
ADD COMMENT
Topic
Name
1+2 =