Documentation Request - Javascript

Command

Where can I find the documentation regarding the left side of the equation below the 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 

Apps Script UI Example

Thanks!

+4
source share
2 answers

This is called Destruction Assignment.

NOTE is only available if your runtime is> = JavaScript 1.7

+10
source

The Mozilla Developer Network has excellent split documentation: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/split

+1
source

Source: https://habr.com/ru/post/1447647/


All Articles