Do you know? what is a compiler and what are Transpiler and the difference between them. if not, then this article is for you After reading this, you will have an understanding of what does Compiler and Transpiler Mean. So, Let's get started.
Compiler
whenever we talk about the compiler, So compiler converts human-understandable language into machine language. As we know that machines understand only binary language. In general, we write code into human understandable language because it is hard to write code into binary language. so, there is a need to convert human-understandable language into binary language. To perform this operation we need a compiler. Let's See an example if you have written code in C, C++, and java so whenever we execute our code, we need a compiler to convert human-understandable language into binary language.
Transpiler
If you are a JavaScript coder, You have heard this word before. Transpiler converts one Code into another code. Transpiler needs when we talk about the conversion of the latest version to the previous version. Let me give an example to you so that it is easy to understand what is Transpiler. The latest version of JavaScript is ES6+ and the Previous one is ES5 So, All the Browsers have a JS Engine to Execute the ES5 Code but not ES6+, so We need to convert ES6+ code into ES5 code. With the help of Transpiler, we perform this Operation.