A bit about Babel

Babel is a transpiler for JavaScript that is popular among developers for its ability to turn ES6 or ES7 into code that can run on your browsers and devices.

This is important because most devices and browsers still support older well-established standards like ES5. So developers can write their code in latest conventions and not worry about errors due to incompatibility.

For example, if you write the following JavaScript code (which follows the ES6 standards):

const numbers = [ 5, 10, 15];

console.log(numbers.map(number => number + 5)); // [10, 15, 20]

Babel will compile it to:

var numbers = [ 5, 10, 15];

console.log(numbers.map(function (number) {

return number + 5;

})); //

This is another plus point about using Babel. You as the developer can write your code in ES6 or ES7, which as we can see above reduces the size of our code. Babel will compile our code to our JavaScript code to browser compatible code.

To add to Babel’s praises, it is the most compatible of all the ES6 transpilers, far surpassing other transpilers like Traceur by Google.