es6-classes Flashcards

1
Q

What is “syntactic sugar”?

A

It is syntax within a programming language meant to make things 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;
    }
}

*Note: the word “constructor” in the example above is not just a placeholder. You actually have to type that in.

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

What is “refactoring”?

A

Refactoring is the process of restructuring existing computer code - changing the factoring - without changing its functionality or its external behavior.

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