If you like me didn’t write any lines of code in JavaScript during the last 5 years, you will be surprised how it changed.
I won’t re-write all existing blog posts and manuals because of two reasons: I’m too lazy for these things and I’m not feeling that I can do it better.
I’ll leave the references for two topics I’ve found useful for me: variables declarations and modules. I like MDN, so I’ll use it for references.
Variables declaration
You don’t need var anymore. OK, you still need if for some cases, but let is great for local variables with a limited scope and const works well if you need a variable which can’t be re-assigned. The value of such a variable could be changed like any mutable variable.
Modules
Finally, we’ve got modules in JavaScript. There are still some limitations in a few browsers and some specs are not approved yet, but with babel you can use it right now. You can import from modules when you need to do it and use export statement to provide a public interface for your modules.