ES8……… 9, 10? 11? 12?

ECMAScript 2017 8th editon (ES2017/ES8) has been officially released and published a few weeks ago, let’s figure it out some important changes. All of these are available with Node 8 and with the latest version of browsers without babel or any polyfills.

Object.values

Like Object.keys, but for values.

Such as Object.keys do, the Object.values method returns an array of a given object’s own enumerable property values instead of keys.

Object.entries

If we merged Object.keys and Object.values, that would be Object.entries. It return an array of [key, value].

The Object.entries() method returns an array of a given object's own enumerable property [key, value] pairs.

padStart

Pad a string from the start until the given length is reached.

The padStart() method pads the current string with another string (repeated, if needed) so that the resulting string reaches the given length. The padding is applied from the start (left) of the current string.

padEnd

Pad a string from the end until the given length is reached.

The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.

Trailing commas in function parameter lists

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade