tor-browser

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

implicit-name.js (482B)


      1 // Copyright 2015 Cubane Canada, Inc.  All rights reserved.
      2 // See LICENSE for details.
      3 
      4 /*---
      5 info: |
      6    Generator can be declared with GeneratorExpression syntax
      7 es6id: 14.4
      8 author: Sam Mikes
      9 description: can create generator function expressions (no name)
     10 features: [generators]
     11 ---*/
     12 
     13 var f = function *(a) { yield a+1; return; };
     14 
     15 assert.sameValue(f.name, 'f');
     16 
     17 var g = f(3);
     18 
     19 assert.sameValue(g.next().value, 4);
     20 assert.sameValue(g.next().done, true);
     21 
     22 reportCompare(0, 0);