logo

How to set default values using ES6 destructuring assignment

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.

Copyright (c) 2023 Adrian Oprea. All rights reserved.