Functions and Objects for Node
Functions and Objects for Node: Function Expressions and Arrow Functions, Arrays of Objects, Destructuring.
Updated
- Function Expressions and Arrow Functions (Apprentice): A function can be stored in a variable like any other value, arrow functions (=>) write small functions in a line, and default values fill in the arguments a caller leaves out.
- Arrays of Objects (Apprentice): An array of objects is a list of records, like a stack of filled-in forms, and it's how programs keep search results, carts and listings that you read, loop over and update.
- Destructuring (Apprentice): Destructuring unpacks the values you need from an object or an array into variables in one line, with defaults for anything missing and new names when you want them.