4 ms·
Not to be a jerk, but why not use objects for key value and arrays for int value? Yes, JavaScript object/array system has it's warts, but to me that's clearly
by tambourine_man 12y ago
Not to be a jerk, but why not use objects for key value and arrays for int value?
Yes, JavaScript object/array system has it's warts, but to me that's clearly the way it was intended to be used.
- myhf 12y agoThe article described the type of situation this arises in: when you want to use arbitrary data as keys of a map, for example when grouping a collection of objects by one of their properties. Any implementation of a hash/map/dictionary should support this process, whether or not it coerces the types of its keys. The problem with the engine in question is that it makes a hash change its behavior when all keys are integers.