Level 2 · Core Development
Module 9: Modern JavaScript Syntax
Destructuring
Unpack values from arrays and objects with destructuring, rename and default the unpacked variables, and destructure function parameters.
Lesson 42
Spread and rest syntax
Use spread syntax to copy and combine arrays and objects, pass array elements as arguments, and collect remaining values with rest syntax.
Lesson 43
Optional chaining
Read nested properties, call methods and index arrays safely with optional chaining, and combine it with fallbacks.
Lesson 44
Nullish coalescing and default values
Choose between ||, ?? and default parameters, and use ??= and ||= to fill in missing values without overwriting valid zeros and empty strings.
Lesson 45
Sets, Maps and modern collection patterns
Use Set for unique values and fast membership checks, Map for key-value data with any key type, and convert between them and arrays.
Module mastery assessment
Eight questions and a practical task covering Lessons 41 to 45: destructuring, spread and rest, optional chaining, nullish coalescing and defaults, Sets and Maps.