es6-classes Flashcards
1
Q
What is “syntactic sugar”?
A
designed to make things easier to read, can be expressed more clearly or concisely
2
Q
What is the typeof an ES6 class?
A
a function
3
Q
Describe ES6 class syntax.
A
`class` keyword `nameOfClass` { `constructor(arg)` `this.arg = arg`; } `function( )` { `return this.arg` } }
4
Q
What is “refactoring”?
A
restructuring existing code without changing external behavior