es6-arrow-functions Flashcards
1
Q
What is the syntax for defining an arrow function?
A
(parameter) => {code block}
2
Q
When an arrow function’s body is left without curly braces, what changes in its functionality?
A
the return statement is not required
3
Q
How is the value of this determined within an arrow function?
A
an arrow function captures the this value of the enclosing context instead of creating its own this context. The value of this is defined when it is being defined.