Sept. 19, 2023, 11:47 a.m. | Shameel Uddin

DEV Community dev.to

🚀 Attention JavaScript Enthusiasts! 🚀


Are you tired of writing lengthy code to conditionally add properties to JavaScript objects? 😫 I've got an elegant shortcut for you that will not only simplify your code but also make it more readable and maintainable! 🤓✨


Traditional Approach:


Let's say you're working on a finance app, and you want to create an object representing a financial transaction with properties like transactionType, amount, and date. However, not all properties are relevant …

attention code finance hack javascript node react simplify typescript working writing

Information Security Engineers

@ D. E. Shaw Research | New York City

Technology Security Analyst

@ Halton Region | Oakville, Ontario, Canada

Senior Cyber Security Analyst

@ Valley Water | San Jose, CA

Senior SecOps Security Architect

@ SGS | Madrid, Spain

Auditeur(trice) de configuration et d’architecture - Cybersécurité - Toulouse

@ Sopra Steria | Colomiers, France

Cybersecurity - staż SantanderTech

@ Santander | Wrocław