Hard'this' Binding💻 Output Question

bind with partial application

💡

Hint

bind can partially apply arguments. The first call fills early arguments — remaining ones come from later calls.

What does this output?

function multiply(a, b) { return a * b; }
const double = multiply.bind(null, 2);
const triple = multiply.bind(null, 3);
console.log(double(5));
console.log(triple(4));
console.log(double(triple(2)));

Correct Output

10
12
12

Why this output?

Explanation: bind(null, 2) pre-fills a=2. double(5)=10. triple(2)=6. double(6)=12.

Key Insight: bind can partially apply arguments. The first call fills early arguments — remaining ones come from later calls.

More 'this' Binding Output Questions

EasyMethod call — this is the calling objectEasyArrow function has no own this — inherits lexicallyMediumbind permanently fixes this — call cannot override itMediumcall vs apply — same result, different syntax

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz