What is your favourite ES6 feature?

Tanwa Sripan - Jun 29 '22 - - Dev Community

Helloooo everyone! 👋 It has been a while since I last posted, I have been rather busy the past 2 weeks!

As the title suggests, I am curious to know what your favourite JavaScript ES6 feature is...🤔

I was recently asked this in an interview and it surprised me as I have been learning JS with latest features so I don't quite know which features are ES6 and which are newer... So I answered with what came to mind, and it was Promises. Since I have been learning about backend development with NodeJS, I have learnt a lot about asynchronous programming which is why I chose that answer (I also talked about async/await, which was not introduced until ES7, oops!). Of course, I had to explain why I chose that particular feature and I talked about the benefit of how it helps eliminate callback hell, improve error handling and how you can use Promise chaining to your advantage.

So, I present to you the same question, what is/are your favourite ES6 feature/s and why? (If you are preparing for an interview, this could be a good practice to answer out loud 😉).

. . . . . . . . . . . . . . . . . . . . . . . . .