Solution Review: `this` Keyword
In this lesson, we will discuss the solutions to the questions in the previous lesson.
We'll cover the following...
We'll cover the following...
For the code above, you had to answer the following question:
Explanation #
The solution is given below.
As you can see, Option D is the correct answer. Let’s discuss the code to understand the answer.
Let’s start from line 14, where we are calling obj.thisFunc.
obj.thisFunc(func, 3);
We are passing it an argument, the function func, and an extra argument, the number 3.
We pass func to thisFunc at a global level, so the ...