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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you run Bable on your script file to compile it?

A

npx babel script.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly