Tagged “objects”
-
TIL fancy methods to transform Javascript Objects objects javascript mdn
You can use Object.entries(), Object.keys(), Object.fromEntries()...
-
TIL a neat way to clone and object and override the items javascript objects
Spread the object into a new object, then override the element later.
-
TIL You can dynamically name objects javascript objects
Not all Object keys have to be hard-coded strings. To make it dynamic, use [brackets].
-
TIL adding properties conditionally using the spread syntax objects javascript conditionals
You can conditionally add properties to objects by ... in there.
-
TIL using Object.freeze to simulate enums in Javascript javascript datatype objects
Enums are useful to assign names to the integral constants which makes a program easy to read and maintain. The keyword 'enum is used to declare an enumeration.
-
TIL not using the delete keyword for performance issues javascript objects performance
The delete keyword is used to remove a property from an object. Apparently, there is performance issues with `delete` with V8 Javascript Engine.
-
TIL Deconstructing Objects javascript codepen objects
Rather than create a big list of parameters in your function, pass the whole object and deconstruct it.
See all tags.