How one can write a function, which takes only few attributes in most-compact way in ES6?  I've came up with solution using destructuring + simplified object literal, but I don't like that list of fields is repeated in the code.  Is there a...
The question is directed at people who have thought about code style in the context of the upcoming ECMAScript 6 (Harmony) and who have already worked with the language.  With () => {} and function () {} we are getting two very similar ways to w...
UPDATE: Recently a brilliant article from Mozilla came up. Read it if you're curious.   As you may know they are planning to include new Symbol primitive type in ECMAScript 6 (not to mention some other crazy stuff). I always thought that the...
I'm sure that this is relatively straightforward and that I'm missing something obvious. I'm reading through Mozilla's tutorials on ES6, and their chapter on destructuring contains the following pattern:     FUNCTION PARAMETER DEFIN...
I'm trying to use the new (ES6) Map objects in order to represent a map between properties and a value.  I have objects in a form similar to:   {key1:value1_1,key2:value2_1},..... {key1:value1_N,key2:value2_N}   I want to group them based on both...
The problem is?  [email protected]:~$ node --harmony test.js  /home/longhao33/test.js:1 (function (exports, require, module, __filename, __dirname) { let str = 'es666666666666';                                                               ^^^...
Can someone explain to me: why are generator functions in ES6 marked by asterisk symbol?   For example, instead of:  function *someGenerator() {     yield 1;     yield 2;     yield 3; }   we could write:     function someGenerator() {     yield 1;...
I want to cache large objects in JS. These objects are retrieved by key, and it makes sense to cache them. But they won't fit in memory all at once, so I want them to be garbage collected if needed - the GC obviously knows better.  It is pretty t...
This is a legitimate question if you really know the answer or can provide some information.  Firefox and Chrome are continually working to include many of the features in ES Harmony...  My question is really 2 parts:   Does anyone know when ES6 wil...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.