Arrow Functions with Context
that logs the
property of a given object to the console. The function should use the
method to execute in the context of the object.
Solution Walkthrough for Arrow Functions with Context
Don't read this unless you've already solved the problem.
method to execute the
function in the context of the object, so that when
is called, the function is executed in the context of the
object and logs "John Doe" to the console.
keyword is inherited from the parent scope and is not redefined. Therefore, in order to use the
method to execute an arrow function in a specific context, we need to define the arrow function using the
keyword, or use other methods such as