Objects
18 lessons
- 01ObjectsLearn how to use Plain Old JavaScript Objects (POJOs) to store data in key-value pairs.
- 02No Colon SyntaxLearn the shorthand syntax for assigning object properties when the key matches a variable name.
- 03Updating PropertiesLearn how to dynamically add or update properties on an existing JavaScript object.
- 04Nesting PropertiesStore objects within objects to represent complex, hierarchical data structures.
- 05Optional ChainingUse the optional chaining operator (?.) to safely access deeply nested properties without throwing TypeErrors.
- 06When to ChainUnderstand the boundaries of optional chaining and why overusing it can hide critical bugs.
- 07Object MethodsDiscover how to add functions directly to objects, turning them into methods.
- 08Methods MutateLearn how object methods can mutate their parent object's properties, even if declared with const.
- 09Initializing PropsEnsure object properties exist by checking for undefined before modifying them.
- 10Strings As KeysUse bracket notation to access object properties dynamically using strings.
- 11The 'this' KeywordAn introduction to the varying contexts of the 'this' keyword in JavaScript.
- 12Arrow FunctionsLearn the syntax and use cases for JavaScript's modern fat arrow functions.
- 13Fat Arrows and ThisUnderstand how arrow functions preserve the 'this' context, making them ideal for callbacks.
- 14Spread SyntaxUse the spread syntax (...) to quickly copy objects and merge their properties together.
- 15Return ObjectsReview how to bypass JavaScript's single-return limitation by returning objects.
- 16DestructuringUnpack object properties into standalone variables easily using the destructuring assignment.
- 17Not BoundUnderstand why JavaScript methods lose their 'this' binding when passed as callbacks, and how to fix it.
- 18Chapter 4 Cheatsheet: ObjectsA quick summary of JavaScript object manipulation, shorthand syntax, optional chaining, and destructuring.