12 Days of Posts: Day 3 – using bind with a function
We are already at day 3. We are continuing with JavaScript and building on what we have already covered. We are going to cover the bind method of the function object.
Bind is used to define what this is inside of a function. It will return a new function (there is that ‘functions are a first class object’ idea again!) and not modify the current function. Let’s look at an example.