M3-ES6 Flashcards

1
Q

What is “syntactic sugar”?

A

Syntactic sugar is a concise syntax that is easier to read or express.

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

What is the typeof an ES6 class?

A

function

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

Describe ES6 class syntax.

A
class Person {
    constructor(name) {
        this.name = name;
    }
    getName() {
        return this.name;
    }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is “refactoring”?

A

refactoring is a process of restructuring code, changing the factoring without changing the external behavior.

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

How are ES Modules different from CommonJS modules?

A

Their syntax is even more compact than CommonJS’s.
Their structure can be statically analyzed (for static checking, optimization, etc.).
Their support for cyclic dependencies is better than CommonJS’s.

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

What kind of modules can Webpack support?

A
ECMAScript modules
CommonJS module
Asynchronous Module Definition (AMD)
Assets
WebAssembly modules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly