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 delete leave a hole in an array in JavaScript?
Deleting an array element looks like it should shrink the array. It does not. Here is what a real run in Node.js 22 printed. The test const a = [1, 2, 3]; delete a[1]; console.log(a); // [ 1, <1 empty item>, 3 ] console.log(a.length); // 3 console.log(JSON.stringify(a)); // [1,null,3] console.log(1 in a); // false Four things fall out of...
Quelle & Fakten · 1 Min. Lesezeit
Quelle: DEV Community (dev.to)
Rubrik: Secure Programming
Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Community-Hinweise zur Meldung
Security Briefing Free · 1-Click Unsubscribe
Intelligence Digest — free
The top security news daily · unsubscribe anytime
Community discussion & comments
Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.