mopahotels.blogg.se

Babel es6
Babel es6










Babel will compile our code to our JavaScript code to browser compatible code. You as the developer can write your code in ES6 or ES7, which as we can see above reduces the size of our code. This is another plus point about using Babel. So developers can write their code in latest conventions and not worry about errors due to incompatibility.įor example, if you write the following JavaScript code (which follows the ES6 standards): const numbers = console.log(numbers.map(number => number + 5)) // īabel will compile it to: var numbers = console.log(numbers.map(function (number) )) // This is important because most devices and browsers still support older well-established standards like ES5. 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.












Babel es6