Question d’entretien chez Tekion

Implement a Polyfill for bind function

Réponse à la question d'entretien

Utilisateur anonyme

27 sept. 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. }