Which version of JavaScript is "Vanilla JavaScript"?
There are so many different versions of JavaScript floating around, and browser support is always changing. How do you know which features you can use without transpiling or some kind of build step?
Correct Answer: ES6 (a.k.a. ECMAS 2015) is supported in all major browsers.
In April of 2017, all major browsers added support for ES6. Opera added support the following August.
But what about Internet Explorer?
Even Microsoft doesn’t want people using IE. They are pushing hard for people to adopt Edge, which also supports ES6. Only 3% of internet traffic comes from Internet Explorer, and that number is only going to decline. Unless you are in circumstances that warrant it, you can safely ignore Internet Explorer.
So start taking advantage of those new features!
Here are some of the new features you can safely use anywhere, including in the console:
- const variables
- template strings
- destructuring assignment
- default parameters
- arrow functions
- promises
- block scopes
So have fun writing better JavaScript!