SoFunction
Updated on 2025-02-28

Detailed explanation of the code that implements call, bind, apply by Javascript

1. Pass the parameters into fn for call

2. Delete the fn on the object

3. If there is no pointer to this currently passed, the value is assigned to window

4. Get the passed parameters

5. Point fn to the currently called function

6. Check whether the currently called function is

7. Return the result