tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

array-elements-without-initializer.js (938B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es6id: 13.3.3
      6 description: >
      7  The ArrayBindingPattern with an element list without initializers
      8 info: |
      9  Destructuring Binding Patterns - Syntax
     10 
     11  ArrayBindingPattern[Yield] :
     12    [ Elisionopt BindingRestElement[?Yield]opt ]
     13    [ BindingElementList[?Yield] ]
     14    [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
     15 
     16  BindingElementList[Yield] :
     17    BindingElisionElement[?Yield]
     18    BindingElementList[?Yield] , BindingElisionElement[?Yield]
     19 
     20  BindingElisionElement[Yield] :
     21    Elisionopt BindingElement[?Yield]
     22 
     23  BindingElement[Yield ] :
     24    SingleNameBinding[?Yield]
     25    BindingPattern[?Yield] Initializer[In, ?Yield]opt
     26 features: [destructuring-binding]
     27 ---*/
     28 
     29 function fn1([a, b]) {}
     30 
     31 function fn2([a, b,]) {}
     32 
     33 function fn3([a,, b,]) {}
     34 
     35 reportCompare(0, 0);