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 ...

Get Learning JavaScript Data Structures and Algorithms - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.