Google Chrome: JavaScript associative arrays, evaluated out of sequence

前端 未结 7 2106
耶瑟儿~
耶瑟儿~ 2020-12-07 02:24

Ok, so on a web page, I\'ve got a JavaScript object which I\'m using as an associative array. This exists statically in a script block when the page loads:

v         


        
7条回答
  •  执笔经年
    2020-12-07 02:24

    The order in which elements are stored in an associative array is not guaranteed. You'll have to sort your output explicitly.

提交回复
热议问题