JS: ECMAScript 2017

By Xah Lee. Date: . Last updated: .

New object methods

New string methods

Allow one trailing comma in syntax

now allow one trailing comma in object literals, function parameters, named imports, named exports.

before, it was allowed in array literal only.

// deno-fmt-ignore
const xx = { a: 0, b: 0, };
console.log(xx);
// { a: 0, b: 0 }

// repeated trailing comma is syntax error
const xx = { a: 0, b: 0, ,};
// deno-fmt-ignore
function ff(x,) { return x + 1; }
console.log(ff(3) === 4);

keywords: async, await

xtodo

Async functions improve the asynchronous programming experience by providing syntax for promise-returning functions.

Shared Memory and Atomics

Shared Memory and Atomics introduce a new memory model that allows multi-agent programs to communicate using atomic operations that ensure a well-defined execution order even on parallel CPUs.

JavaScript. ECMAScript New Features