Team,
Where can I find documentation regarding the left side of the equation of the below JavaScript Code:
var [a, b, c] = "10-11-12".split('-');
Result:
a = 10
b = 11
c = 12
// Note: this is used in Google Apps Script
Thanks!
This is called destructuring assignment
NOTE it's only available if your runtime is >= JavaScript 1.7
Mozilla Developer Network has some great documentation on the split method: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/split
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With