Bada
Bada's Coding

Bada's Coding

Follow
Series

JavaScript


Articles in this series

Keys in Destructured Parameters Can Have Default Parameters

Jan 3, 20231 min read

Below is an example. const obj1 = {}; const obj2 = { k: 2 }; function fn({ k = 1 }) { console.log(k); } fn(obj1); // 1 fn(obj2); // 2

Keys in Destructured Parameters Can Have Default Parameters
Optional Chaining Cannot Be Used on the Left-Hand Side
Parameter Destructuring with Default Parameter
Error Handling in 'async-await'
Computed Property Names: All the Keys Change into String
'this'