What Removing Object Properties Tells Us About JavaScript — Smashing Magazine
Removing properties from an object in JavaScript might not be the most exciting job, but there are many ways to achieve it, each revealing a fundamental aspect of how JavaScript works. Juan Diego Rodríguez explores each technique in this article.
- Contestant A: “I set c to undefined.”
- Contestant B: “I used the delete operator.”
- Contestant C: “I deleted the property through a Proxy object.”
- Contestant D: “I avoided mutation by using object destructuring.”
- Contestant E: “I used JSON.stringify and JSON.parse.”
- Contestant F: “We rely on Lodash at my company.”
November 2, 2023 at 11:55:27 AM EDT
*
FILLER