With ES6 classes, you can also use property initializers.
simpixelated
3
Good point about ESLint plugin, thanks. I was told about class properties + arrow functions solution, but I didn’t mention it and doesn’t use it personally because it requires babel-preset-stage-1 plugin which means that these features are not quite stable and the syntax might change. It’s important to mention that I’m not against those early features, I just think that class properties are not that popular so it may confuse others.