Top "Ecmascript-6" questions

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

How to import jquery using ES6 syntax?

I'm writing a new app using (JavaScript) ES6 syntax through babel transpiler and the preset-es2015 plugins, as well as semantic-ui …

javascript jquery ecmascript-6 browserify semantic-ui
Typescript: Cannot use import statement outside a module

I have a .ts file in node js (latest version of node.js for 07.10.19) app with importing node-module without default …

typescript ecmascript-6
Access to ES6 array element index inside for-of loop

We can access array elements using a for-of loop: for (const j of [1, 2, 3, 4, 5]) { console.log(j); } How can I modify …

javascript ecmascript-6 for-of-loop
Getting "Cannot call a class as a function" in my React Project

I'm trying to add a React map component to my project but run into an error. I'm using Fullstack React's …

javascript google-maps reactjs ecmascript-6 react-router
Typescript es6 import module "File is not a module error"

I am using typescript 1.6 with es6 modules syntax. My files are: test.ts: module App { export class SomeClass { getName(): string { …

javascript typescript ecmascript-6
Proper use of const for defining functions in JavaScript

I am interested if there are any limits to what types of values can be set using const in JavaScript—…

javascript function constants ecmascript-6
setState() inside of componentDidUpdate()

I'm writing a script which moves dropdown below or above input depending on height of dropdown and position of the …

javascript reactjs ecmascript-6
Are 'Arrow Functions' and 'Functions' equivalent / interchangeable?

Arrow functions in ES2015 provide a more concise syntax. Can I replace all my function declarations / expressions with arrow functions …

javascript ecmascript-6 arrow-functions
Export multiple classes in ES6 modules

I'm trying to create a module that exports multiple ES6 classes. Let's say I have the following directory structure: my/ └── …

javascript module export ecmascript-6 babeljs
Is it possible to sort a ES6 map object?

Is it possible to sort the entries of a es6 map object? var map = new Map(); map.set('2-1…

javascript ecmascript-6