Diese Meldung stammt aus dem kuratierten RSS-Feed von DEV Community. Den vollständigen Artikel mit allen Details findest du direkt beim Herausgeber.
Intelligence View
⚡ tsecurity.de Intelligence
Does Object.keys keep your insert order in JavaScript?
Assign the keys b, 2, a, 1 to a plain object and Object.keys comes back as 1, 2, b, a. That is not a bug and it is not random: the spec splits keys into two groups and sorts one of them. The test const o = {}; o.b = 1; o[2] = 2; o.a = 3; o[1] = 4; console.log(Object.keys(o)); // [ '1', '2', 'b', 'a' ] console.log(JSON.stringify(o)); //...
Quelle & Fakten · 1 Min. Lesezeit
Quelle: DEV Community (dev.to)
Rubrik: Sichere Programmierung
Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Community-Hinweise zur Meldung
Security Briefing Kostenlos · 1-Klick-Abmeldung
Intelligence Digest — kostenlos
Täglich die wichtigsten Security-News · jederzeit abbestellbar
Community-Diskussion & Kommentare
Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.