Babel Now on CodePen! Write ES6+ JavaScript (and React JSX)

May 19, 2015

Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.

Babel is essentially a preprocessor for JavaScript. You write JavaScript with all the fancy ES6 (and beyond) features you want, and the code is compiled down to ES5 so it can run in pretty much whatever browser.

We used to use Traceur for this. Turns out Babel can do everything Traceur can does and more, and seems to have more love and momentum. So instead of offering Babel in addition to Traceur, we just replaced it. If you had a Traceur Pen, it's using Babel now.

Bonus! React does JSX too

If you like writing in React, you may like writing in the JSX syntax as well. You know, the JavaScript with the HTML right in it that looks kinda weird but a lot of people like it.