Top "Ecmascript-6" questions

The 2015 version of the ECMAScript specification, now a standard (ECMAScript 2015).

ECMAScript 6 arrow function that returns an object

When returning an object from an arrow function, it seems that it is necessary to use an extra set of {} …

javascript ecmascript-6 arrow-functions
JavaScript Extending Class

I have a base class: function Monster() { this.health = 100; } Monster.prototype.growl = function() { console.log("Grr!"); } That I want to …

javascript oop object inheritance ecmascript-6
What do multiple arrow functions mean in javascript?

I have been reading a bunch of react code and I see stuff like this that I don't understand: handleChange = …

javascript ecmascript-6 arrow-functions
Is there a way to create interfaces in ES6 / Node 4?

ES6 is fully available in Node 4. I was wondering whether it includes a concept of interface to define method contracts …

javascript node.js interface ecmascript-6
JS/ES6: Destructuring of undefined

I'm using some destructuring like this: const { item } = content console.log(item) But how should I handle content === undefined - …

javascript ecmascript-6
Get the class name of ES6 class instance

Are there any 'harmonious' ways to get the class name from ES6 class instance? Other than someClassInstance.constructor.name Currently …

javascript ecmascript-6 traceur
ES6 module Import giving "Uncaught SyntaxError: Unexpected identifier"

For a personal project, I'm trying to use ES6 import to write cleaner code. As first test, I'm writing an …

javascript html ecmascript-6 es6-modules
Promises, pass additional parameters to then chain

A promise, just for example: var P = new Promise(function (resolve, reject) { var a = 5; if (a) { setTimeout(function(){ resolve(a); }, 3000); } …

javascript promise ecmascript-6 es6-promise
When should I use Arrow functions in ECMAScript 6?

The question is directed at people who have thought about code style in the context of the upcoming ECMAScript 6 (Harmony) …

javascript lambda ecmascript-6 ecmascript-harmony arrow-functions
Using ECMAScript 6

I'm looking for a way to run ECMAScript 6 code in my browser's console but most browsers don't support functionality that …

google-chrome google-chrome-extension userscripts ecmascript-6