Call, apply & Bind in JavaScript - Front End Interview 🔥 Episode 4 - In 20 Minutes

  Рет қаралды 87,852

Technical Suneja

Technical Suneja

2 жыл бұрын

Learn call, bind & apply functions in JS - step by step with examples.
This is a common JavaScript interview question. Learn why we use the call function and what is need of the call function. If you want to set the value of this keyword while calling the function, you need to use the call or apply method. bind is similar to call or apply but the function is not executed immediately but returns another function instance that is bound to the object you have passed in the bind call.
⭐ Timestamps to Skip the video:
00:00 - Don't skip anything 🙏
I believe that this video will help you to understand better in terms of career growth.
Put your comments and share your experience with us if you like this video. Also if you have some suggestions then please suggest them in the comment box.
⭐ Modern JavaScript ES6 Tutorial by Technical Suneja
► bit.ly/3CkjENa
⭐ Full Stack Web Developer ( Complete Roadmap)
► ytube.io/3JYi
⭐ Support vs Development Jobs? Projects? What to choose
►ytube.io/3K5i
⭐ Off-Campus Job Placements Complete Roadmap ► ytube.io/3JpA
⭐ Latest IT Vlogs :
► ytube.io/3Ik9
⭐ Wednesday Episodes By Technical Suneja
► ytube.io/3FIN
⭐ Coding Stuff :
► / technicalsunejaji
⭐ ReactJS Tutorial For Beginners. :
► ytube.io/3FIL
⭐ CTC v/s IN HAND SALARY | Huge Packages Explained🤔 GOOGLE, MICROSOFT, Facebook! 🔥
► ytube.io/3FIF
⭐ Top 5 Programming languages for 2021
► ytube.io/3FIH
⭐ Best Top 5 Frontend Frameworks of 2021 for Web Development
► ytube.io/3FII
⭐ 10 Generic steps to becoming Javascript Developer | Frontend & Backend Both🔥
► ytube.io/3FIJ
⭐ Best LinkedIn Tips for Job seekers in 2021 - Proper Utilisation of LinkedIn 🔥
► ytube.io/3FIK
⭐ My Thoughts on Web Development & Mobile App Development - Which is better?
► ytube.io/3FIS
⭐ Competitive Programming vs Software Development - Where Should I Invest My Time? 🔥
► ytube.io/3FIR
⭐ My Thoughts on Mean Stack Developer - Are you looking for a FullStack Developer?🔥
► ytube.io/3FIQ
⭐ My Thoughts on Full Stack Developer - Perfect Path 🔥🔥
► ytube.io/3FIP
Want Webhosting service ?
If you are planning to host your website in a very decent amount you can contact us on the given numbers.
Contact Details :
1. +91-9990131528
2. +91-8529119425
More Details (Visit our website ) ►hosting.technicalsuneja.com/
⭐ Follow us on Social Media platforms:-
------------------------------------------------------------
🔥 Instagram ► / sunejaajay
🔥 Technical Suneja Official Instagram ► / asksunejaji
🔥 Facebook Page ► / technicalsunejaji
🔥 Join Group ► / 1981858225403035
🔥 LinkedIn ► / ajaysuneja
------------------------------------------------------------
⭐ My Telegram Group Link:
Technical Suneja official ► t.me/joinchat/V53dTczAWc52IrLv
⭐ My KZbin equipment
1)MacBook Air ► amzn.to/2Tqj3Zz
2)LCD Screen for Coding ► amzn.to/3zeYSyi
3)SanDisk 500GB SSD ► amzn.to/3pNEArf
4)WD 1TB Normal ► amzn.to/3gr5UY9
5)HP laptop ► amzn.to/3pK4NHg
6)Canon M50 Mark II ► amzn.to/2TjlEEO
7)Chair Link ► amzn.to/2RSvoWk
8)Echo Dot (3rd Gen) ► amzn.to/3iCLhLd
9)Canon EF-S 18-55mm lens ► amzn.to/3cEwH22
10)HP Laserjet ► amzn.to/3zjEEn7
11)JBL Headphones ► amzn.to/3gwXEGf
⭐ Microphone:
1)Boya Lav Mic ► amzn.to/2SsqVtD
2)BOYA by-MM1 ► amzn.to/3gdZKf4
4)Uhuru UM-SF777 ► amzn.to/3go4mOG
1)GoPro Max ► amzn.to/3gtdf9F
2)GoPro Accessories ► amzn.to/3xlCIc5
⭐ Lights Used:
1)Digitek (DRL-18HC9) Professional ► amzn.to/3gj9yVo
2)GoDox SL60W ► amzn.to/3whw9Hr
My Router ► amzn.to/3ge4RMr
Realme Buds Air ► amzn.to/3gtzpIX
⭐ Tripod
1)DIGITEK® DTR ► amzn.to/3ge0AZg
2)For Mobile ► amzn.to/3iBfrPh
3)JB01507-BW ► amzn.to/3pQ48UL
call bind apply in javascript,javascript interview questions,call apply bind javascript tutorial,difference between call,apply and bind javascript,this keyword in javascript in hindi,javascript this keyword in hindi,learn javascript from scratch hindi,javascript for beginners hindi,javascript cheezycode tutorials hindi,learn javascript programming hindi,full stack javascript series,cheezycode javascript web development
#ITVlogs #JavaScript

Пікірлер: 168
@TechnicalSuneja
@TechnicalSuneja 2 жыл бұрын
00:00 - Don't skip anything 🙏 Aur kya haal sabke? btao next topic JS kon sa hona chahiye ??
@rajasinghrajpoot8626
@rajasinghrajpoot8626 2 жыл бұрын
bhaiya backend With node Js interview pr video bnao...☺☺
@mohdtausif
@mohdtausif 2 жыл бұрын
please make a video on throttling and denouncing in details.
@soomjeetsahoo8710
@soomjeetsahoo8710 2 жыл бұрын
How is bind saved in memory stack vs a call? Does bind creates a reference?
@farzamyousuf3354
@farzamyousuf3354 2 жыл бұрын
function ke uper video honi chahiye ziayda confusion function main hoti simple function aur arrow function main
@rumanmushtaq898
@rumanmushtaq898 2 жыл бұрын
@@rajasinghrajpoot8626 yes right i also need
@pujamohanty8825
@pujamohanty8825 2 жыл бұрын
The way you explained call,bind and apply....it's fantastic 👏
@sayalikhot4328
@sayalikhot4328 Жыл бұрын
The way you explained call, apply and bind....it's fantastic. Thanks @Technical Suneja
@bhumikasingh4419
@bhumikasingh4419 Жыл бұрын
Very well explained with examples! Thank you!
@akashaher1001
@akashaher1001 2 жыл бұрын
Thank you very much sir... For providing us such wonderful videos... 💯❤️
@user-qx8cf5ns3q
@user-qx8cf5ns3q 10 ай бұрын
thank you so much finally clear my doubts in these 3 methods
@GunjanSingh-uy8ro
@GunjanSingh-uy8ro Ай бұрын
bahut ache se ... you are awesome
@krishgupta4408
@krishgupta4408 5 ай бұрын
You seems to be very humble person... thanks for the video!
@siddharthabiswal275
@siddharthabiswal275 Жыл бұрын
LOVELY!
@ramsiya2018
@ramsiya2018 3 ай бұрын
waw ! amazing , bhut video dekhe ,lekin ab ja kr clear hua , thank u guru ji
@Yash-ry5wj
@Yash-ry5wj Жыл бұрын
Thanx Bhaiya ❤️, Understood all.
@digitalaashu6279
@digitalaashu6279 Жыл бұрын
thanks bro such a wonderful explanation, i have read articles but i didn't get the concept but your video is enough, beautifully explained.
@sankethtj
@sankethtj Жыл бұрын
Very Well Explained. Thank you very much..
@varsha8279
@varsha8279 4 ай бұрын
Perfect!!! 🤩.. thank you so much!
@amansingh8697
@amansingh8697 Жыл бұрын
Very helpful video thank you sir❤❤
@diwakardayal954
@diwakardayal954 4 ай бұрын
thank you!!
@unseenjoda9899
@unseenjoda9899 Жыл бұрын
Explained Nicely... Jab hume pata hi nahin hai problem kahan hai... Solution ko kaise use karen... Great sir
@rishabhprakash
@rishabhprakash Жыл бұрын
thanks man !
@ayushipriya7811
@ayushipriya7811 Ай бұрын
very well explained sir...
@jesussheepakash9289
@jesussheepakash9289 Жыл бұрын
Thank you bhaiya
@laxmipriyapradhan1704
@laxmipriyapradhan1704 3 ай бұрын
Thanks 😅 Awesome video
@nileshsable3872
@nileshsable3872 Жыл бұрын
its awesome video all douts clear sir thank you
@user-eo3oc8ef3y
@user-eo3oc8ef3y 11 ай бұрын
Thankyopu so much best explanation and simple explanantion
@ayushiprajapati2552
@ayushiprajapati2552 4 ай бұрын
Well explained !
@amanprajapati9252
@amanprajapati9252 29 күн бұрын
Great sir!🙏😊
@RaviKumar-hz8cf
@RaviKumar-hz8cf 8 ай бұрын
Tank you Buddy
@hitanshpatel9548
@hitanshpatel9548 Жыл бұрын
Your explanation is really very good and understandable.
@avinashpawar2236
@avinashpawar2236 Жыл бұрын
Thanks alot sir 🤗 amazing video
@shreyash8273
@shreyash8273 11 ай бұрын
Thanks Sir
@arijitnagchowdhury3740
@arijitnagchowdhury3740 24 күн бұрын
Very nice explanation
@Vikaskumar-ur5di
@Vikaskumar-ur5di 2 жыл бұрын
thanks for sharing amazing video
@amitbhagat120
@amitbhagat120 6 ай бұрын
Bhai ne smjha diya vo bhi simple word me❤❤
@user-hk6ip5qe8x
@user-hk6ip5qe8x 10 ай бұрын
It helped me a lot , thanks
@NeerajSharma-sk2rs
@NeerajSharma-sk2rs Жыл бұрын
thanku bhai
@jagdishjena9058
@jagdishjena9058 2 жыл бұрын
Thank you so much sir.
@user-ek6to2wf2u
@user-ek6to2wf2u 11 ай бұрын
In JavaScript, call, apply, and bind are methods that allow you to control the value of the this keyword within a function and also enable you to pass arguments to a function in different ways. These methods are commonly used in object-oriented programming and functional programming paradigms. Call Method: The call method is used to call a function and explicitly specify the value of this inside the function. It allows you to pass arguments to the function individually as a comma-separated list. javascript Copy code const person = { name: "John", sayHello: function() { console.log(`Hello, my name is ${this.name}`); }, }; const anotherPerson = { name: "Alice", }; person.sayHello(); // Output: Hello, my name is John person.sayHello.call(anotherPerson); // Output: Hello, my name is Alice In the example above, we have an object person with a method sayHello. Using call, we can invoke the sayHello method with a different object anotherPerson to change the value of this inside the method. Apply Method: The apply method is similar to the call method, but instead of passing arguments individually, it takes the arguments as an array. javascript Copy code const person = { name: "John", sayHello: function(greeting) { console.log(`${greeting}, my name is ${this.name}`); }, }; const anotherPerson = { name: "Alice", }; person.sayHello("Hi"); // Output: Hi, my name is John person.sayHello.apply(anotherPerson, ["Hello"]); // Output: Hello, my name is Alice In this example, we have modified the sayHello method to accept a greeting argument. Using apply, we can pass the arguments in an array to change the value of this inside the method and provide the greeting. Bind Method: The bind method is used to create a new function with a specific value for this, which can be used later. Unlike call and apply, the bind method does not immediately invoke the function but returns a new function with the specified this value. javascript Copy code const person = { name: "John", sayHello: function() { console.log(`Hello, my name is ${this.name}`); }, }; const anotherPerson = { name: "Alice", }; const helloFunction = person.sayHello.bind(anotherPerson); helloFunction(); // Output: Hello, my name is Alice In this example, we use bind to create a new function helloFunction with the value of this set to anotherPerson. When we call helloFunction(), it logs the message with the name from anotherPerson. Choosing Between Call, Apply, and Bind: The choice between call, apply, and bind depends on your specific use case. Use call or apply when you want to immediately invoke a function with a specific this value and pass arguments individually or as an array, respectively. Use bind when you want to create a new function with a preset this value to be called later. In summary, call, apply, and bind are powerful methods in JavaScript that allow you to control the value of this inside a function and provide flexibility in passing arguments. Understanding how to use these methods can enhance your code's readability and enable you to create more robust and reusable functions.
@Jk-tr1fb
@Jk-tr1fb 2 жыл бұрын
Ye series to amazing h bhaiya 👍
@niteshsen690
@niteshsen690 Жыл бұрын
Very well explained ❤
@nter_10_ment52
@nter_10_ment52 Жыл бұрын
bhai best explanation hai apka.
@indpriderdx5174
@indpriderdx5174 Жыл бұрын
greate tutorial hats of to you sunejaji .. nice-one
@RahulChauhan-lm8mk
@RahulChauhan-lm8mk Жыл бұрын
Very good video. Immpressive.
@tausifkovadiya1810
@tausifkovadiya1810 2 жыл бұрын
Excellent explanation...
@user-zx2pb3un4u
@user-zx2pb3un4u 5 ай бұрын
thank you so much sir achhhyyyy se smjh a gya😛💗
@sandeepsunny8467
@sandeepsunny8467 Жыл бұрын
nice explanation with simple real examples....)
@shwetajaiswal1263
@shwetajaiswal1263 Жыл бұрын
U are great
@legendarygaming8180
@legendarygaming8180 6 күн бұрын
khatarnaak👌👌
@shailenderjaiswal1685
@shailenderjaiswal1685 Жыл бұрын
very well explained bhaiya 👍
@uncodeyourself4473
@uncodeyourself4473 Жыл бұрын
great bro
@rohanmainali9040
@rohanmainali9040 Жыл бұрын
Please learn these concepts because today in my mid-level react interview I got these questions.
@jituop2702
@jituop2702 2 жыл бұрын
Your voice so good , clear and fine Video is very help full
@tejass817
@tejass817 Жыл бұрын
useful content....tq
@ayantikachakraborty4512
@ayantikachakraborty4512 4 ай бұрын
great
@shanmaqbool5048
@shanmaqbool5048 5 ай бұрын
very owseom
@ankit_panchal
@ankit_panchal 2 жыл бұрын
Great 👍
@jitendrachauhan5963
@jitendrachauhan5963 2 жыл бұрын
Very good tutorial
@priyankasoni1405
@priyankasoni1405 2 жыл бұрын
Please make video for inheritance in JavaScript , before es6 how inheritance was working and with es6 syntax 🙏
@mshahzebraza
@mshahzebraza 2 жыл бұрын
Amazing Content
@prathmeshrupnur2416
@prathmeshrupnur2416 Жыл бұрын
nice video every point discussed in video was clear to me sir ,i request u to make a playlist on javascript for beginners to advance.
@viyyankumar8834
@viyyankumar8834 2 жыл бұрын
Thanks u bhia
@sparsh-0384
@sparsh-0384 Жыл бұрын
Well explained 👍
@shaansharma2504
@shaansharma2504 Жыл бұрын
we support you :)
@pankajsuryavanshi8332
@pankajsuryavanshi8332 Жыл бұрын
Continue this series.....
@YashDEVELOPER12
@YashDEVELOPER12 Жыл бұрын
One important use of bind function is : When we used a function as callback like setTimeout() , there is chance that method loose reference of object . So to tightly bind the method with object we can use bind method. Apart of this.. thanks alot brother for explaining call and apply function very well..
@sumittiwari231
@sumittiwari231 4 ай бұрын
bhai koi real life examplle deke samjh dena please . abhi tk mera clear nhi hua doubt en topic pe
@AshwaniSharma-vg5xm
@AshwaniSharma-vg5xm 2 жыл бұрын
pls make video on => What is a deep and shallow copy in JavaScript? What is by default?
@MAJORpiyush
@MAJORpiyush 10 ай бұрын
good video nyc
@PANKAJKUMAR-fe8zn
@PANKAJKUMAR-fe8zn 2 жыл бұрын
Thanks for this video sir... please make video on fetch API and this keyword
@harishkumarsbd
@harishkumarsbd 11 ай бұрын
superb👍
@tayebkhan2061
@tayebkhan2061 10 ай бұрын
nice sir The way you explained call,bind and apply....it's fantastic
@TechnicalSuneja
@TechnicalSuneja 10 ай бұрын
Keep watching
@manishsoni7103
@manishsoni7103 2 жыл бұрын
Sir please make a series of JavaScript tutorials from zero to hero for beginners to expert.
@zoyahussain5147
@zoyahussain5147 Жыл бұрын
nice
@gaminggyanbaba299
@gaminggyanbaba299 Жыл бұрын
@Technical Suneja as another parameter we can take array in call function too so what is difference between call and apply?
@fakhruddin746
@fakhruddin746 Жыл бұрын
Well Described @technical Suneja Firstly thanks to you to this brief explanation Just one more point here, That is { Call Apply bind with arrow function}.
@rohit_dev
@rohit_dev Жыл бұрын
I think call, apply and bind will not work with the arrow function because arrow function don't have their own this keyword.
@daminiraj4846
@daminiraj4846 Жыл бұрын
Pls make more videos on advanced javascript
@abdullahkhansaffy9703
@abdullahkhansaffy9703 2 жыл бұрын
10/10 marks
@jagdishjena9058
@jagdishjena9058 2 жыл бұрын
sir plz make videos on Shallow copy and Deep copy.
@ManikChakraborty
@ManikChakraborty 2 жыл бұрын
Brother can you make a video please about starting job with .net at 2022, will it be good or not , what will be the scope of .net in future n all
@sunnyrauniyar6769
@sunnyrauniyar6769 Жыл бұрын
Great simple explanantion again, this video could have been a little shorter or you could add some use-case or necessary situation usecase at the end of video. Thanks again
@Doglapan64
@Doglapan64 2 жыл бұрын
Content is described simply and in an easy way. Just a suggestion that need to describe definitions of that too. Which make it perfect course. Thanks
@ArjunSingh-es2iw
@ArjunSingh-es2iw Жыл бұрын
+1
@mohammedzaheer4215
@mohammedzaheer4215 6 ай бұрын
Call means we can call any object using call and get it's values and apply means we can store the argument in array and bind means we can make tho copy of the function and Store it in a variable and call when needed is I'm right if not correct me
@SunnySunny-mh5do
@SunnySunny-mh5do 4 ай бұрын
11:54 I am surprised.. How ajay n anuj became bhai-bahan. 😊
@vikrambais5330
@vikrambais5330 10 ай бұрын
plz also make some frontend projects using react js .. there are very less video just focusiing on frontend projects using react js.. videos to hai par we sab full stack pe focussed hai .. and jab tak ek beginner frontend hi nhi sikh payeha using react js to in sabhi full stack projects ko kaise kar payega..
@gppatil33
@gppatil33 2 жыл бұрын
Sir my name is Gajanan. I would like to tell you that your videos are to the point and well explained. I just want to tell you that i have difficulty in finding your playlist for JavaScript. I m following the react js playlist currently on hooks.... if i get a reply will be soo happy.
@TechnicalSuneja
@TechnicalSuneja 2 жыл бұрын
Thank you so much for your feedback 😊 Will keep uploaded such contents in future .👍
@chiragkumarrathod3234
@chiragkumarrathod3234 2 жыл бұрын
make videos on ruby on rails
@JainabaBanu
@JainabaBanu 4 ай бұрын
call : binds the this value, invokes the function, and allows you to pass a list of arguments. apply : binds the this value, invokes the function, and allows you to pass arguments as an array. bind : binds the this value, returns a new function, and allows you to pass in a list of arguments.
@rajasinghrajpoot8626
@rajasinghrajpoot8626 2 жыл бұрын
bhaiya backend With node Js interview pr video bnao...☺☺
@TechnicalSuneja
@TechnicalSuneja 2 жыл бұрын
Will do 🙂
@NikhilKumar-ec9lf
@NikhilKumar-ec9lf Жыл бұрын
👍👍👍👍
@Jk-tr1fb
@Jk-tr1fb 2 жыл бұрын
Node.js ki bhi aisi short ,simple ,crisp series le aao interview time aa gya h please 🙏
@Vikaskumar-ur5di
@Vikaskumar-ur5di 2 жыл бұрын
like dependency injection concept like call function
@sumitkumar-hl8dt
@sumitkumar-hl8dt 2 жыл бұрын
Explain real life problems which can be achieved using all the methods pz
@ajaydubey4715
@ajaydubey4715 2 жыл бұрын
Hi i have one issue with that suppose if we use parameters as array in call() then it is also working why??
@smitraghani9735
@smitraghani9735 Жыл бұрын
Can anyone explain practical use of this concept where you have applied this in your code
@raj_amancha
@raj_amancha 2 жыл бұрын
Sir jo font size vs code me use kiye hai utna font size console me kar do to ye video agar me Mobil me dekhu to bhi thik se dikhe and Your great sir thanks 😊
@prateeksingh5896
@prateeksingh5896 2 жыл бұрын
👍
@shreyashkaushal8155
@shreyashkaushal8155 6 ай бұрын
just one question , in that problem statement, if we use arrow function , some thing like this let userDetails ={ name : "Shreyash Kaushal", age : 28, designation : "Software Developer", printDetails : ()=>{ console.log(this.name) } } it doesn't print anything, may i know why ?
@car_holic1995
@car_holic1995 Жыл бұрын
Live projects me kya use h ?
@anilrajmeena4373
@anilrajmeena4373 2 жыл бұрын
Please make video about this keyword
@nomantahir2132
@nomantahir2132 7 ай бұрын
Lekin apply function ma receive side par hum array receive karna ka bajay parameters receive kr rha hn. Agr hun array bhej rha hn to receive bhi Hume array nai karna hota?
@gouravnainwaya5669
@gouravnainwaya5669 2 жыл бұрын
React native bhi sikhao
@user-mj6zb1jt1x
@user-mj6zb1jt1x 4 ай бұрын
Should we also tell the problem statement first and then actually use it in the interview?
@SunnySunny-mh5do
@SunnySunny-mh5do 4 ай бұрын
In case of bind... when in called newfun()... it returned the desired values... and undefined too.. why, someone pls explain
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 42 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 89 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 52 МЛН
call, apply and bind method in JavaScript
10:50
Akshay Saini
Рет қаралды 443 М.
Closures in JavaScript 🔥 Episode 3 - In 12 Minutes
12:54
Technical Suneja
Рет қаралды 76 М.
Selected as Frontend Engineeer | 1 Year Experienced Interview | JavaScript and React
2:04:20
2.5 Years Experienced Best JavaScript Interview
2:03:06
Anurag Singh ProCodrr
Рет қаралды 175 М.
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 42 МЛН