public/swaggerui/swagger-ui.js
function parseArrayPattern(params, kind) {
        var node = new Node(), elements = [], rest, restNode;
        expect('[');

        while (!match(']')) {
            if (match(',')) {
                lex();
                elements.push(null);
            } else {
                if (match('...')) {
                    restNode = new Node();
                    lex();
                    params.push(lookahead);
                    rest = parseVariableIdentifier(kind);
                    elements.push(restNode.finishRestElement(rest));
                    break;
                } else {
                    elements.push(parsePatternWithDefault(params, kind));
                }
                if (!match(']')) {
                    expect(',');
                }
            }

        }

        expect(']');

        return node.finishArrayPattern(elements);
    }
function parseArrayPattern(params, kind) {
        var node = new Node(), elements = [], rest, restNode;
        expect('[');

        while (!match(']')) {
            if (match(',')) {
                lex();
                elements.push(null);
            } else {
                if (match('...')) {
                    restNode = new Node();
                    lex();
                    params.push(lookahead);
                    rest = parseVariableIdentifier(kind);
                    elements.push(restNode.finishRestElement(rest));
                    break;
                } else {
                    elements.push(parsePatternWithDefault(params, kind));
                }
                if (!match(']')) {
                    expect(',');
                }
            }

        }

        expect(']');

        return node.finishArrayPattern(elements);
    }
function parseArrayPattern ( params , kind ) { var node = new Node ( ) , elements = [ ] , rest , restNode ; expect ( '[' ) ; while ( ! match ( ']' ) ) { if ( match ( ',' ) ) { lex ( ) ; elements . push ( null ) ; } else { if ( match ( '...' ) ) { restNode = new Node ( ) ; lex ( ) ; params . push ( lookahead ) ; rest = parseVariableIdentifier ( kind ) ; elements . push ( restNode . finishRestElement ( rest ) ) ; break ; } else { elements . push ( parsePatternWithDefault ( params , kind ) ) ; } if ( ! match ( ']' ) ) { expect ( ',' ) ; } } } expect ( ']' ) ; return node . finishArrayPattern ( elements ) ; }
ECMA-262 13.3.3 Destructuring Binding Patterns
ECMA - 262 13 . 3 . 3 Destructuring Binding Patterns