5 ms·
What's the star in "function *(){}" for ? EDIT: Answer: that's how "generator functions" are recognized. http://wiki.ecmascript.org/doku.php?id=harmony:generat
by zimbatm 13y ago
What's the star in "function *(){}" for ?
EDIT: Answer: that's how "generator functions" are recognized. http://wiki.ecmascript.org/doku.php?id=harmony:generators http://wiki.ecmascript.org/doku.php?id=harmony:generators
- goldenkey 13y agoThanks, I was wondering the same thing. "A function named star you say?" Heh :-)
- vbv 13y agoDoes node.js support the * though. I tried their example and getting this: app.use(function *(next){ ^ SyntaxError: Unexpected token * at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3