call, apply and bind methods| Method Borrowing | Modern Javascript 2021

preview_player
Показать описание
call, apply and bind are predefined methods in javascript and its very using to handle this keyword .
this keyword work quiet differently in javascript as compared to other object oriented language and that creates confusion for the programmers.

Function borrowing allows us to use the methods of one object on a different object without having to make a copy of that method and maintain it in two separate places. It is accomplished through the use of .call(), .apply(), or .bind(), all of which exist to explicitly set this on the method we are borrowing.
There are many benefits to method borrowing:
It prevents the unnecessary duplication of code.

It allows the user to use methods of different objects without inheriting.

Using method borrowing prevents the replication of methods in multiple object blocks and saves time.

call, apply and bind method is just to implement method borrowing, where we can use explicitly specify what this should reference within the calling function.

In this video, I have explained how you should write your functions so that you can optimised your code and can clear the coding round during your interview.

Support my channel so that I can reach to wider audience. Please share it in your network 🙏

Connect with me on social platform:

For more such interesting videos, please subscribe to my channel and stay connected.

#javascript #NishaSingla #callapplybind
Рекомендации по теме
Комментарии
Автор

I can't explain in words how well you have explained. you are really great

yandlurinirosha-ltjg
Автор

What a superb explanation of concepts👍👍

samkorgal
Автор

Been trying really hard to wrap my head around these three methods; finally, a video that made sense and I understood them. Greetings from Pakistan.

sarfraznawaz
Автор

Wonderfully explained!!! I have tried to understand call, apply and bind by reading many blogs and many websites. But in just 23min video you explained it clearly. Thank you

darshangowda
Автор

Call apply and bind i wanted to know. Luckily i got your video. Really helpful thanks.

logeesh
Автор

Hi Nisha,
No one gave so much clearity between the differences of these methods like you did with examples.
Much appreciated .
Kudos !!

rahulhasani
Автор

Excellent explanation. Thank you so much for explaining the very deep concepts of javascript Nisha. It is really easy to understand the concepts when you are explaining. I recommend everyone who is learning javascript to watch all of his videos.

dashrathnaik
Автор

Wow! Really clear and thorough explanation!

BurritoBrooks
Автор

Excellent explaining!!! Deep content as always!! Thanks you very much for your effort!!!

akiratoriyama
Автор

Thanks for your clean and clear explanation

rajeshkolluri
Автор

Appreciate the way you explain the concepts, Grateful 🙏

jayeshgite
Автор

Clear and to the point (Top level Teaching) :)

mr.abu-bakerbp
Автор

comma seperated syntax worked for me even I use apply

akifcankara
Автор

Very nicely and clearly explain this concept
Thank you very much
Is there any plan for basic Javascript?

ZahidHussain-prhg
Автор

Great explanation Nisha, just a suggestion you can create a part 2 for this tutorial and cover more examples of how "this" works weird in js like in case of closure (you have actually covered here but a practice with few more examples would be good).

ashutoshankur
Автор

Super madam please keep vedios countinsuly madam. 🙏🙏

chilakalauttejuttej
Автор

Mam please make a detailed video on this keyword with interview questions

bishwajeetpandey
Автор

Hello Nisha please make a video on data structures and algorithms

prabhanjandeshpande
Автор

Hi Nisha,
Great Explaination, Really appreciated the way you explained. Can you please do a video on closure and on oops concepts?
Thanks in Advance

santhoshmamidi