DEV Community

Discussion on: Call() Apply() and Bind() in JavaScript

Collapse
 
emreerdogan profile image
Emre Erdoğan • Edited

Hey man. Your style of explaining is amazing. Very easy to understand! But seems like there is a mistake in your last example. bind doesn't take arguments as array. It takes arguments regularly similar to call.

So, this is wrong:
let isBranStillAlive = jonSnow.isStillAlive.bind(branStark, [true]);

But this is correct:
let isBranStillAlive = jonSnow.isStillAlive.bind(branStark, true);

bind

Cheers

Collapse
 
khalid050 profile image
Khalid Umar

woops. Thank you :)