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: Programación segura
Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Community-Hinweise zur Meldung
Briefing de seguridad Gratis · baja en 1 clic
Intelligence Digest — gratis
Cada día las noticias de seguridad más importantes · baja en cualquier momento
Debate de la comunidad y comentarios
Inicia el debate en el stream de difusión del Social Chat o envía arriba una contribución experta mediante el formulario de ampliación.