javascript-this Flashcards
1
Q
What is “this” in JavaScript?
A
“this” is an implicit parameter of all JavaScript functions.
2
Q
What does it mean to say that “this” is an “implicit parameter”?
A
It means the parameter is within the code block, even though it was not declared or named in the parameter list. But always accessible.
3
Q
When is the value of “this” determined in a function; call time or definition time?
A
Call time.
4
Q
How can you tell what the value of “this” will be for a particular function or method definition?
A
The value of “this” will be the object that is calling it.
5
Q
How can you tell what the value of “this” is for a particular function or method call?
A
The value of this will be in relation to who made the call.