Pregunta de entrevista de Tekion

Implement a Polyfill for bind function

Respuesta de la entrevista

Anónimo

27 sep 2020

Function.prototype.myBind = function(context, ...params) {//According to him bind doesn't take params here.On correcting he was just getting annoyed const that = this; return function(...args) { that.apply(context, params.concat(args) //this.apply here we refer to the function bind is invoked on.When i told that's not the case he started shouting } At this point i lost the will to continue interview with him. }