DEV Community

Cover image for What is Babel used for?
sajedsoliman
sajedsoliman

Posted on

What is Babel used for?

Well, before we start talking about what Babel does, we need to figure out what the problem it solved. We know that Web Browsers have JS engines in them, and these engines are responsible for reading our JS code to make our apps functional.

But these engines understand only specific versions of JS and unfortunately, ES6 is not one of them. I think it is now clear what Babel came for, wait not? Ok, Babel takes new modern JS that is not supported or understandable by browsers and compile it into old versions of JS that are supported and understandable by browsers.

That way, we (developers) are happy since we can use new JS features, and browsers are also happy because they receive syntax they understand.

That it πŸ€·β€β™‚οΈ easy right ? I hope you guys enjoyed this short article πŸ˜ƒπŸ˜ƒ

Top comments (0)