1.

What Is Babel?

Answer»

Babel is the one of the most POPULAR javascript transpiler 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. I = PI;

Babel is the one of the most popular javascript transpiler 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. I = PI;



Discussion

No Comment Found