Note that if the value given to such a destructuring binding is null or undefined, you get an error, much like you would if you’d directly try to access a property of those values.
This doesn't appear to be the case in the code editor. If I try the below code, destructuring on the nonexistent property "jam", it simply assigns undefined, rather than raising an error.
This doesn't appear to be the case in the code editor. If I try the below code, destructuring on the nonexistent property "jam", it simply assigns undefined, rather than raising an error.
let {jam} = {name: "Faraji", age: 23}; console.log(jam); // -> undefined