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

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.
Рекомендации по теме
Комментарии
Автор

in case of call method we pass the arguments directly and to the function in case of Apply method we passed as a array [x, y]

harishankathi
welcome to shbcf.ru