bind implementation
JavaScript
function bind (obj, args) {
/* your implementation */
}
const obj = {name: 'Batman'};
const getName = function () { return this.name };
console.assert(typeof bind(obj) === 'function', 'Should return function');
console.assert(bind(obj) && bind(obj)() === 'Batman', 'Should call function in object context');