The typical way to loop x times in JavaScript is: for (var i = 0; i < x; i++) doStuff(i); But I don’t want to use the ++ operator...
New ES 6 (Harmony) introduces new Set object. Identity algorithm used by Set is similar to === operator and so not much suitable for comparing objects: var set =...
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...
With () => {} and function () {} we are getting two very similar ways to write functions in ES6. In other languages lambda functions often distinguish themselves by...
I have a flat JS object: {a: 1, b: 2, c: 3, ..., z:26} I want to clone the object except for one element: {a: 1, c: 3, ...,...
Set seems like a nice way to create Arrays with guaranteed unique elements, but it does not expose any good way to get properties, except for generator [Set].values, which...