I’m trying to understand what is the use of Babel. It seems to transform JS we write into older versions.
I guess this is because not all browsers support the same JS version.
Is there any page I could find this information for all browsers or at least for differente versions of Mozilla Firefox browser?
I tested most of recent JS expressions in the console and they work perfectly, so I’m confused.
For example, this code taken from Babel runs just fine:
// Babel Input: ES2015 arrow function
[1, 2, 3].map((n) => n + 1);
// Babel Output: ES5 equivalent
[1, 2, 3].map(function(n) {
return n + 1;
});
So I’d conclude ES6 is supported on my version. But can’t find any details for other versions.