Similar in style to weak maps but without the funny garbage collection semantics or non-enumerability. Depends on the iterators and egal proposals. Depends on classes only for expository purposes. Given /** A non-stupid alternative to Array.prototype.indexOf */ function indexOfIdentical(keys, key) { for (var i = 0; i < keys.length; i++) { if (keys[i] is key) { return i; } } return -1; } Executable