javascript-this Flashcards
1
Q
What is this in JavaScript?
A
a keyword that contains a value that is defined at call time
2
Q
What does it mean to say that this is an “implicit parameter”?
A
it is available in a function’s code block even though it was never included in the function’s parameter list or declared with var.
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
this refers to the variable that it is being defined inside of
5
Q
How can you tell what the value of this is for a particular function or method call?
A
whatever object is calling the function