call(thisArg, arg1, arg2) gọi hàm ngay với this chỉ định, truyền args riêng lẻ. apply(thisArg, [arg1, arg2]) gọi ngay nhưng truyền args dạng array — mẹo nhớ: apply = array. bind(thisArg) trả về hàm mới với this cố định, không gọi ngay.
Ví dụ thực tế: const greet = function(greeting) { return greeting + ' ' + this.name; }; greet.call({name: 'An'}, 'Hello') trả về 'Hello An'. bind thường dùng khi truyền method như callback: btn.addEventListener('click', obj.method.bind(obj)).
call(thisArg, arg1, arg2) calls the function immediately with a specified this, passing args individually. apply(thisArg, [arg1, arg2]) calls immediately but passes args as an array — memory tip: apply = array. bind(thisArg) returns a new function with a fixed this, does not call immediately.
Practical example: const greet = function(greeting) { return greeting + ' ' + this.name; }; greet.call({name: 'An'}, 'Hello') returns 'Hello An'. bind is typically used when passing a method as a callback: btn.addEventListener('click', obj.method.bind(obj)).