Babel Module #44 Flashcards
1
Q
What is Babel anyway?
A
Babel is a compiler: it takes code written in one standard, and it transpiles it to code written into another standard.
In short, it insures compatibility across browsers and JS versions.
2
Q
What’s the recommended way to install Babel?
A
Locally, in a project directory. Using this command:
npm install –save-dev @babel/core @babel/cli
3
Q
How would you make sure arrow functions are handled across major browsers and versions?
A
npm install –save-dev \ @babel/plugin-transform-arrow-functions
4
Q
How can you run Bable on your script file to compile it?
A
npx babel script.js