Category: ES6

  • ES6 Destructuring Recipes

    ES6 Destructuring Recipes

    ES6 Destructuring is awesome, but it’s not always obvious how you can use it to its most awesome extent. In this post, I’ll show you just some of the ways you can make maximum use of destructuring to make your code terser and cleaner. General Destructuring Recipes Destructure the results of promise.all Promise.all accepts an […]

  • Advanced ES6 Destructuring Techniques

    Advanced ES6 Destructuring Techniques

    Going even deeper into ES6 destructuring now, this post shows how to get maximum awesomeness by using destructuing on deeply nested objects, functions, generators, and even regExes! Destructuring Arrays and Objects together In my previous post on how to actually use ES6 destructuring, I showed separate examples for array destructuring and object destructuring. But what […]

  • The Most In-Depth Yet Understandable ES6 Destructuring Tutorial (complete with Assembled Avengers)

    The Most In-Depth Yet Understandable ES6 Destructuring Tutorial (complete with Assembled Avengers)

    Destructuring is a new ES6 technique for extracting data from JavaScript objects and arrays using a much tighter, terser, and clearer syntax than that provided by ES5. The result is not just the saving of a few bytes of code; destructuring can change the way you code in radically new ways, and the more you […]