Javascript – Why javascript bind doesn’t work

bindjavascript

function:

function talk(){ 
        console.log(this.name + " dice: ");
}

var Person = function(name, surname){
    this.name = name;
    this.surname = surname;
}

var p = new Person("Mark", "Red");

talk.bind(p);

what's wrong with bind?

Best Answer

It does work, talk.bind(p) returns the bound function:

talk.bind(p)();