Some recent work has pushed me into scoping my javascript more consciously. There is a lot of usage of this
on a local level that can make things all sorts of confusing. There are multiple avenues to properly scope your javascript through your functions, but keeping this
scoped properly to use in other scopes gets complicated. I use two different methods and am unsure which is best:
assigning to a new variable
Can now be used inside other functions as _this
when you also need the specific function's this
scope.
using .bind(this)