98 Flashcards
(2 cards)
1
Q
Arrow Function inside a Method –> this keyword inside this arrow function points to … ?
A
the this keyword of an arrow function which is inside a method points to the this of the Object
(because in general the this keyword of an arrow function points to the this of its parent scope)
2
Q
const addExpr = function(a,b) { console.log(arguments) console.log(a+b) } addExpr(2,5) // (1) addExpr(2,5,8,12) // (2)
A
-
(1): Arguments(2): [2,5,…]
7 -
(2): Arguments(4): [2,5,8,12,…]
7