JS THIS Flashcards

1
Q

What is this in JavaScript?

A

this is an implicit parameter of all JavaScript functions.
the value of this is determined at call time.
this refers to an object
this changes when it is being called

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does it mean to say that this is an “implicit parameter”?

A

this is always present but not explixity called as a parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When is the value of this determined in a function; call time or definition time?

A

call time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you tell what the value of this will be for a particular function or method definition?

A

This is nothing unitl is it called

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you tell what the value of this is for a particular function or method call?

A

Can look to the left, function being called
if no left deafult is window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly