call(), apply() and bind() || Method Borrowing || Function Borrowing in JavaScript - Part 2

preview_player
Показать описание
Method borrowing, also known as function borrowing, is, as its name implies, a way for an object to use the methods of another object without redefining that same method. In JavaScript, we can reuse the method of a function on a different object other than the object it was defined on.
Рекомендации по теме
Комментарии
Автор

call(), apply(), bind() all are used for method borrowing
ex:- using toolbox by by different people
----> syntax wise both call() and bind() are same ==> we use comma separated for extra parameters
----> apply() ==> We use an array for extra parameters
----> bind() ==> It's a return type we need to store in a variable and invoke it to get the result

But when comes to bind()
I don't understand why it's not invoking directly as call() and apply() does. What's the
And why do we get [Function: bound getFullDetails]

can you share a video to understand much better or make a video?

sailaxmikomirineni
visit shbcf.ru