Vue.js is number one for the third consecutive week.
ES2018, the latest specification of the JavaScript language, has been officially published this week.
Let’s have a look at the main features of this specification:
- Object “rest” properties and spread operator (dot dot dot
...
) - Asynchronous iterators: you can use
for await
to loop through iterators that return Promises - Promise.finally(), useful to run statements whenever a Promise either resolves or rejects
- Features related to regular expressions (
RegExp
), including the “named capture group”.
For more details, check What’s new in ECMAScript 2018.
Note that Create React App, in the TOP 10 this week, lets you write React applications taking advantage of a lot of the recent additions to the JavaScript language, including the rest properties and the spread operator.
Asynchronous iterators are supported in node.js 10, they can be used to consume a stream of data as mentioned in this article by Dr. Axel Rauschmayer.
If you want to dive right into the code and see asynchronous iterators in action, you can run this simple GitHub Gist that I’ve wrote especially for my dear readers. Feel free to comment!
Any question or feedback? Reach us on GitHub.
Best of JavaScript is a project created by Michael Rambeau, made in Osaka, Japan.