JavaScript Tutorial ✦
Return DataType of bind()
bind() returns a new function with preset this value and arguments.
const obj = { value: 'test' };
const bound = obj.method.bind(obj);
console.log(typeof bound); // 'function'
bind() returns a new function with preset this value and arguments.
const obj = { value: 'test' };
const bound = obj.method.bind(obj);
console.log(typeof bound); // 'function'