• Array.prototype.flatMap from ES2019

    Use the flatMap function to both map and flatten at the same time.

    Watch Now
  • Copy an Object with the Spread Operator

    Use the spread operator to copy a flat object. Note that this is a shallow copy.

    Watch Now
  • For...in Loop vs. For...of Loop

    Arrays can be iterated through using both for...in and for...of, but there are differences. This video shows that for...of accesses the values of each element and for...in accesses the indexes of each element.

    Watch Now
  • Merge Arrays using the Spread Operator

    Use the spread operator to merge multiple arrays. This example uses two, but the same pattern can be used for more.

    Watch Now
  • Merge Objects with JavaScript's Spread Operator

    Using the spread operator you can merge objects. This example uses two objects, but the syntax is the same for more. Note that duplicate keys will be overridden.

    Watch Now
  • Copy an Array with the Spread Operator

    Use the spread operator to create a copy of a flattened array.

    Watch Now
  • Convert an Object to an Array and back again with Object.entries and Object.fromEntries

    Use these functions in order to flip back and forth between an Object and an Array.

    Watch Now
  • Flatten a Nested Array in JavaScript with Array.prototype.flat

    This is an example of how to use the flat method available on the array prototype in JavaScript.

    Watch Now