Since ECMAScript 2015, using the Map object could be an alternative. A Map shares some similarities with an Object and guarantees the keys order:
A Map iterates its elements in insertion order, whereas iteration order is not specified for Objects.
Consider using LinkedHashMap instead of HashMap/TreeMap for internal default implementation.
2条答案
按热度按时间djp7away1#
xlpyo6sf2#
got it, thanks, however, any plan to make ES2015 conform behavior?