Learning JavaScript Data Structures and Algorithms
上QQ阅读APP看书,第一时间看更新

Using Babel.js

Babel (https://babeljs.io) is a JavaScript transpiler, also known as a source-to-source compiler. It converts JavaScript code with ECMAScript language features to equivalent code that uses only language features from the widely supported ES5 specification.

There are many ways of using Babel.js. One of them is installing it according to its setup (https://babeljs.io/docs/setup). Another one is using it directly in the browser through its Try it out option (https://babeljs.io/repl), as demonstrated in the following screenshot:

Along with each example that will be presented in the following topics, we will also provide a link so that you can run and test the examples in Babel.