tor-browser

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

array-rest-elements.js (749B)


      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  Array Binding Pattern with Rest Element
      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  BindingRestElement[Yield] :
     17    ... BindingIdentifier[?Yield]
     18 features: [destructuring-binding]
     19 ---*/
     20 
     21 function fn1([...args]) {}
     22 
     23 function fn2([,,,,,,,...args]) {}
     24 
     25 function fn3([x, {y}, ...z]) {}
     26 
     27 function fn4([,x, {y}, , ...z]) {}
     28 
     29 function fn5({x: [...y]}) {}
     30 
     31 reportCompare(0, 0);