Tag

array index

0 views collected around this technical thread.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Mar 15, 2021 · Frontend Development

Why Object.keys() Doesn’t Preserve Insertion Order: A Deep Dive into JavaScript Engine Sorting

This article investigates why JavaScript's Object.keys() may return keys in an unexpected order, explains the specification‑defined sorting rules for integer and string properties, demonstrates the issue with timestamp tags on iOS and Android, and explores the actual implementations in QuickJS and V8 engines.

JavaScriptObject.keysQuickJS
0 likes · 16 min read
Why Object.keys() Doesn’t Preserve Insertion Order: A Deep Dive into JavaScript Engine Sorting