Saturday, 30 December, 2017 UTC


Summary

Here's a trick I use to render a default page when a parameterized Express.js route is called with no parameter.
You will learn how to set default values when using the destructuring assignment with objects. The destructuring assignment is used to unpack values from arrays or properties from objects, as you will see in this video.
Useful links
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
  • http://es6-features.org/#ObjectAndArrayMatchingDefaultValues
  • http://es6-features.org/#DefaultParameterValues