February 2018
Intermediate to advanced
298 pages
8h 22m
English
While destructuring, you can also provide default values for the variables if an array index is undefined. The following example demonstrates this:
let [a, b, c = 3] = [1, 2];
console.log(c); //Output "3"
Read now
Unlock full access