Ce contenu n'est disponible que dans les langues suivantes :Dansk, English, Español, ÙØ§Ø±Ø³Û, Indonesia, Italiano, æ¥æ¬èª, íêµì´, Ð ÑÑÑкий, Türkçe, УкÑаÑнÑÑка, OÊ»zbek, ç®ä½ä¸æ. Merci de
Second bind
importance: 5
Can we change this by additional binding?
What will be the output?
function f() {
alert(this.name);
}
f = f.bind( {name: "John"} ).bind( {name: "Ann" } );
f();
The answer: John.
The exotic bound function object returned by f.bind(...) remembers the context (and arguments if provided) only at creation time.
A function cannot be re-bound.