Member-only story

‘The 5 most transformative JavaScript features in ES8’

Beck Moulton
4 min readNov 1, 2024

--

The front-end position has been pushed in

ES8 contains many valuable features that completely change the way we write JavaScript.

The code has become more concise, easier to write, and upgraded with new features.

Let’s take a look at these features and see if you missed any.

1. trailing comma

Before ES8, trailing commas would cause syntax errors!

❌ Previously:

const colors = [
'red',
'blue',
'green',
'yellow', // ❌ Not allowed
]; const person = {
name: 'Tari Ibaba',
site: 'codingbeautydev.com' // ❌ No way
};

But this raises some issues, rearranging the list can be troublesome:

We also have to always add a comma at the last item before adding a new item — this can make git differences confusing:

So ES8 fixed all of these:

✅ Now?

const colors = [
'red',
'blue',
'green',
'yellow', // ✅ yes
];const person = {
name: 'Tari Ibaba',
site

--

--

Beck Moulton
Beck Moulton

Written by Beck Moulton

Focus on the back-end field, do actual combat technology sharing Buy me a Coffee if You Appreciate My Hard Work https://www.buymeacoffee.com/BeckMoulton

No responses yet