Argument thisArg
is just a pointer to this
context of the caller that will also be used as the context of callback. It is provided for convenience.
The result is the same as if using native Function.bind()
method e.g.:
_.map(collection, callback.bind(this));
An alternative approach would be to make an alias variable of this
and use it instead.