What’s new in JavaScript? ES2017 Language Features

The ECMAScript 2017 Language Specification – the 8th edition of the spec – was officially released at the end of June by TC39. 💁‍♂️ ICYWW: Should we say ES2017 or ES8? → Say ES2017. Back in the day ES6 was (and still is) used a lot to refer to ES2015, but one should be referring …

10 Lodash Features You Can Replace with ES6 ES2015

Lodash is the most depended on npm package right now, but if you’re using ES6 ES2015, you might not actually need it. In this article, we’re going to look at using native collection methods with arrow functions and other new ES6 features to help us cut corners around many popular use cases. 10 Lodash Features …

ESNext: JavaScript “Optional Chaining Operator”

UPDATE February 2018: The proposed operator got renamed from “Null Propagation Operator” to “Optional Chaining Operator”. This post has been updated to reflect this name-change. UPDATE December 2019: This feature has now advanced to Stage-4 and will be part of the ES2020 Specification! 🎉 Earlier today I was delighted to see that the “Optional Chaining …

ES6 ES2015: Looping over an Object with keys and values

Say you have an object like this: const obj = { firstName: ‘John’, lastName: ‘Doe’, age: 50, eyeColor: ‘blue’ }; Using lodash’s forEach you can easily loop over this object, with easy access to both the key and the value: _.forEach(obj, function(value, key) { console.log(key + ‘ ‘ + value); }); But what about ES2015? …

ES6 ES2015 and React snippets for Sublime Text

babel-sublime-snippets contains a set of shorthands for Sublime Text to working more easily with ES2015 and React. With it, for example, you can just type cdup followed by a TAB and you’ll end up with componentDidUpdate(prevProps, prevState) {…}. Find it as Babel Snippets through Package Control. babel-sublime-snippets →