The thing about object orientation that a lot of people have trouble with is inheritance, and the lexical this. ES6 Arrow functions do away with the lexical this, but they don't expose lexical arguments either. I know of people who have been tripped up by this, but they're documented in the spec, if you bother to read it, as I did when I heard about people getting tripped up).
const keyword is one such feature that I've found useful.
It's a fairly trivial feature, but being able to declare that some value is not to be mutated has helped me track down bugs faster.
If I try to reassign a const, I get an error.
Otherwise, it's business as normal, no harm done.
Using these features
I'll probably write more about the features I'm using (and how I'm using them) in a dedicated article, but that's all irrelevant if I don't have a version of nodejs that lets me use these features (unless you're using them in a browser that supports them).
Luckily, there's this page which explains how to install the latest version on operating systems which tend to fall behind.
On Debian (which tends to fall waaaaay behind everyone else):
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
...and you should end up with an ES6 setup by default.
This doesn't mean that you have to use the latest features in your code, and I do recommend writing code that's backwards compatible, since it will make it much easier for people who haven't updated yet (or those who for some reason are unable to update).
You will, however, benefit from improvements to the platform, such as binding to all network interfaces via a
This was the feature that finally prompted me to update on my servers, since I tend to want to expose an HTTPD on both IPv4 and IPv6.