I can explain the difference between function declarations and function expressions. Yes. Declarations can get used higher than they are written, expressions can't.
I can explain what the value of this
is in a normal function.
Global window
I can explain what the value of this
is when called from the context of an object.
The object
I can explain how to explicitly set the value of this
in a function.
.call(this, arguments) or .apply(this, [arguments])
I can explain the difference between call
and apply
.
They allow you to explicitly define this, the only difference is that aaply takes other arguments as an array whereas call doesn't need the arguments to be in an array.
I can describe an case where I might need to use bind
to avoid polluting the global scope.
Yes, when something is asyn, or calling a function from a constructor, you may need to bind the 'this'
I can explain how bind
works.
Passing a function and the context of this.