So among the methods I want to note bind() ,call () and apply ().
The someFunction.bind (someObject) method allows you to create a new function with the same body and scope as the someFunction function, but with a binding to the someObject object:
The call () method calls a function with the specified this value and arguments.
this points to the object for which the function is called — in this case, the global window object.
If the object for which the function is called is not important to us, then we can pass the value null.
The apply () method is similar to the call () method, which also calls the function and also receives the object for which the function is called as the first parameter. Only now, an array of arguments is passed as the second parameter: