A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-126.js
1functiontag(){returnthis.id;}
2consta=tag.bind({id:"A"});
3constb=a.bind({id:"B"});
4console.log(b());
Scope
Answer & explanation
Console output
A
Why
Once a function is bound with bind, its this is locked in and cannot be overridden by a later bind, call, or apply. So a fixes this to {id:"A"}, and binding a again to {id:"B"} produces a function that still uses the original this, returning "A". This irreversibility is a defining property of bound functions.