Posted On: Feb 22, 2018
Babel is one of the most popular JavaScript transpilers and becomes the industry standard. It allows us to write ES6 code and convert it back in pre-Es6 JavaScript that browser supports.
For example look the below code snippet.
In ES6 (ECMASCRIPT 2015)
const PI = 3.141593; PI > 3.0 ; export{PI};
In ES5 after conversion
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var PI = 3.141593; PI > 3.0; exports.PI = PI;
Never Miss an Articles from us.
Es6 or ECMASCRIPT 2015 is sixth major release of ECMAScript language which comes with a lot of new features and syntax..
New Features in ES6. Support for constants (also known as “immutable variables”) Block-Scope support for both varia..
Installation: In order to install Babel, you require node.js and NPM. Make sure Node.js is installed on your server. To ..