According to babeljs.io
Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards-compatible version of JavaScript in current and older browsers or environments.
- It is a great tool for backwards compatibility of modern javascript code.
- With babel, we can write modern javascript that are not implemented in web browsers yet.
- It compiles down the new modern javascript syntax into older javascript code that the browser can understand
- It also converts React JSX syntax into browser understandable javascript code.
In other words Babel is a free and open-source JavaScript transcompiler that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript that can be run by older JavaScript engines
What is a transcompiler?
- A transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent source code in the same or a different programming language
- It is also known as source-to-source translator, source-to-source compiler.
- Babel is a popular transcompiler.
Top comments (0)