underscore icon indicating copy to clipboard operation
underscore copied to clipboard

about the prototype chain of _.bind when there is no native bind, what the details as below

Open hyZhang0701 opened this issue 9 years ago • 0 comments

function Animal(name,color){ this.name = name; this.color = color; }

var Cat = _.bind(Animal,{},"jerry"); var cat = new Cat('red'); //case1 console.log(cat instanceof Animal); //return true;

case2 console.log(cat instanceof Cat); //return false;

//Ps: I think in the case2 , it should be true;

hyZhang0701 avatar Oct 26 '17 07:10 hyZhang0701