Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Return a new function that closes over the original function reference, the bound context, and any partially applied arguments. When the returned function is called, concatenate the bound args with the new call args and delegate to originalFn.apply(context, allArgs). This enables both full binding and partial application.
The returned closure captures the original function and context permanently. Combining bound args with call-time args enables currying-like partial application where some arguments are pre-filled.
Updated Feb 2026