es6 arrow functions Flashcards
1
Q
What is the syntax for defining an arrow function?
A
let varname = () => code block;
2
Q
When an arrow function’s body is left without curly braces, what changes in its functionality?
A
It doesnt need return statement
3
Q
How is the value of this determined within an arrow function?
A
this is defined by where the function is defined (in the lexical scope)