Q9: What is the difference between call(), apply(), and bind()?
call() invokes a function with a specified this context and arguments passed individually (fn.call(ctx, arg1, arg2)). apply() invokes the function with arguments passed as an array (fn.apply(ctx, [arg1, arg2])). bind() returns a new function with this bound permanently.
Key Takeaways
callaccepts arguments comma-separated;applyaccepts an array.bindreturns a bound copy of the function without immediate execution.
Knowledge Check
Which method executes a function immediately with an array of arguments?