Call and this in javascript | chai aur

  Рет қаралды 79,460

Chai aur Code

Chai aur Code

Күн бұрын

Пікірлер: 190
@thecalgarians4597
@thecalgarians4597 8 ай бұрын
I did not even know that call/bind/apply even exist. Hitesh ji, you nailed it.
@Dev-Phantom
@Dev-Phantom 11 ай бұрын
I use to think "Call, apply and bind " was just a theoritical nothing practical thing but this is the first time I actually understood the Use Case of "CALL" , one of the best Lecture thanks sir. Again Thanks a lot.
@Hafijur0211
@Hafijur0211 11 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 📜 *Introduction to Video and Keywords* - Brief introduction to the video and its purpose. - Emphasis on the importance of understanding keywords. - Mention of the tendency to rush through topics in courses. 00:29 🗂️ *Different Keywords and their Usage* - Explanation of the variety of keywords used in the script. - Noting that multiple keywords are often combined and explained together. - Suggestion to understand keywords at different time durations for better comprehension. 01:10 🚀 *Evolution of React and Coding Practices* - Historical perspective on React's early versions and coding practices. - Description of the initial challenges due to limited language features. - Transition from minimalistic coding to the current abundance of language features and libraries. 01:54 🔄 *Execution Context and Function Interaction* - Explanation of the global execution context and its persistence. - Illustration of how functions maintain their execution context. - Emphasis on the memory and context carried by functions during execution. 02:34 🔄 *Execution Context and Function Relationships* - Explanation of execution context in JavaScript functions. - Advantages of visualizing code through diagrams. - Illustration of the global execution context and nested function contexts. 03:00 🗃️ *Understanding Execution Context Hierarchy* - Introduction to the concept of execution context hierarchy. - Overview of the global execution context and its position in the hierarchy. - Explanation of how nested functions create their own execution contexts. 03:29 🔍 *Challenges with Execution Context References* - Discussion on the challenges of referencing execution contexts in nested functions. - Examination of how 'this' keyword behaves in different contexts. - Highlighting the complexities when functions refer to outer execution contexts. 04:10 🧩 *Troubleshooting Global Execution Context Issues* - Explanation of problems arising from global execution context references. - Introduction to the 'this' keyword and its role in context resolution. - Discussion on common issues related to referencing objects in different contexts. 05:07 🔄 *Overlapping Abstraction in Real-world Scenario* - Discussion on the persistent problem of overlapping abstraction in real-world scenarios. - Introduction to a practical example to illustrate the issue. - Creation of a new file named 'dot.js' to demonstrate practical implementation. 05:50 📝 *Setting User Details Functionality* - Explanation of creating a function named 'setUserName' to set the username. - Implementation of rules to check and fetch username from the database. - Demonstration of accessing and setting user details within the 'setUserName' function. 06:49 🔄 *Internal Execution Context Access in Nested Functions* - Understanding the access of variables declared within functions in the internal execution context. - Illustration of the 'setUserName' method accessing variables declared internally. - Explanation of how internal functions have access to variables declared in their scope. 07:18 🛠️ *Optimizing Function Calls for Better Access* - Optimization strategy for better access to variables within nested functions. - Discussion on creating a new user with a unique keyword for improved access. - Highlighting the significance of organizing and minimizing function calls for efficient code. 07:31 🔒 *Issue with Property Assignment in Execution Context* - Introduction to the problem with property assignment in the current execution context. - Observing the output after running the code and identifying issues. - Lack of proper setting of properties within the object causing unexpected behavior. 08:09 🛠️ *Debugging and Fixing the Property Setting Problem* - Debugging the code to identify the root cause of the property-setting problem. - Recognizing that the 'setUserName' method is not properly setting the 'username' property. - Addressing the issue by correctly assigning the 'username' property within the function. 08:49 🔍 *Analyzing Reference and Execution Context in JavaScript* - Understanding the reference and execution context of the 'setUserName' method. - Discussing the role of the 'set' method in accessing and modifying object properties. - Clarifying the need for proper referencing and execution context to avoid issues. 09:17 🛠️ *Implementing Method of Object Substitution for Clarity* - Introducing the concept of method of object substitution for clearer code. - Demonstrating how the 'Object.subset' method works in the current scenario. - Discussing the advantages of using clear and concise coding techniques for better understanding. 10:14 🔄 *Handling Execution Context Removal and Reference Hole* - Explanation of removing execution context and reference hole within the outer function. - Demonstrating how variables declared inside the function become inaccessible after execution. - The importance of keeping a reference hole and the execution context for proper functioning. 10:29 🚧 *Troubleshooting and Debugging the Reference Hole Issue* - Identifying the need to maintain a reference hole for variables and functions. - Troubleshooting the problem of the reference hole affecting the expected behavior. - Discussing the syntax and practical aspects of resolving the issue. 11:13 🌐 *Utilizing Global Object for Reference Hole Solution* - Introducing the use of the global object to maintain a reference hole. - Demonstrating how to pass the global object as an optional parameter to the function. - Ensuring that changes inside the function do not affect the global context. 12:08 🧰 *Applying Execution Context Pass for Improved Functionality* - Implementing execution context pass as a solution to the reference hole problem. - Clarifying the significance of passing the context and the resulting improvement in functionality. - Emphasizing the importance of understanding execution context in interviews and real-world scenarios. Made with HARPA AI
@amit16_01
@amit16_01 7 ай бұрын
Kuch teachers ke aawaj se unko padhna achha lagta hai. You are one of them Sir..
@ManishPrajapati_IIITS
@ManishPrajapati_IIITS Жыл бұрын
Congratulations sir for 150K subscribers...You deserve much more than that!...
@Dev-Phantom
@Dev-Phantom 8 ай бұрын
best example for ecplanation of , what is call in js. Thanks sir
@samrat_pandey
@samrat_pandey 7 ай бұрын
Watch almost 2 playlist before that, but never ever learn new thing that way. Thank you Sir.
@ketanrtd1
@ketanrtd1 29 күн бұрын
Very good explanation of the call, and amazing teaching style.
@sourabhkakani1809
@sourabhkakani1809 Жыл бұрын
one of the best series of JAVASCRIPT in KZbin 👍, the way of explanation is very good . Thanks for making such great videos for us
@sumitsinha995
@sumitsinha995 10 ай бұрын
Ekdum badiya explain bhiya ,dimag me hi call stack console.log ho gya !!
@nehabansal370
@nehabansal370 9 ай бұрын
The way you explains sir, that definitely came from years of experience. I used to move from one video to other to understand topics. But now found gem, no need to go anywhere else. Aapke samjhane se sab samajh aa jata h😊
@SarveshKumar-08
@SarveshKumar-08 Жыл бұрын
01:37 Understanding execution context and 'this' keyword in JavaScript 03:17 Understanding the execution context in JavaScript functions 05:01 Explanation of setting usernames and creating users using JavaScript functions 06:45 Understanding execution context in JavaScript 08:28 Explaining the concept of object substitution and its implications 09:56 Managing execution context in JavaScript [Removing execution context will cause all declared variables to disappear To keep a reference of the execution context, use the "CALL" Method] 11:24 Discussing the use of 'this' in different scenarios and its implications
@architapatnaik687
@architapatnaik687 Жыл бұрын
Great effort sir. This is one of the tricky ones , which you explained very well. I was always wondering why we need call/apply/bind, as we can call a function directly with its name. The only difference is, via call/apply/bind we can set our current context (optionally can send our parameters) , which we cant do via normal function call. But, now i understood, under the hood its the function execution context which play a vital role when there is function inside another function.
@kunnu_4
@kunnu_4 6 ай бұрын
12:20, Also run with a call back function to see if the 'this' for the callback does something different
@geeteshyadav12
@geeteshyadav12 4 ай бұрын
sir you have explained it very easily, thank you
@amit16_01
@amit16_01 7 ай бұрын
Love this JAVASCRIPT series.... Love you Hitesh Sir.....🙏🙏🙏🙏
@mdmusaddique_cse7458
@mdmusaddique_cse7458 7 ай бұрын
Such good demonstration of call and this. Diagrammatic illustration makes the understanding concrete.
@muhammadarslan78676
@muhammadarslan78676 6 ай бұрын
I am addicted to Sir Hitesh Lectures, top notch quality available for free
@akshayjain2777
@akshayjain2777 Жыл бұрын
Thanks sir jii ❤ your content and the way you explain is osm . You made js to easy to learn
@chaiaurcode
@chaiaurcode Жыл бұрын
Thanks ❤️
@abhishekkhatana1256
@abhishekkhatana1256 Жыл бұрын
Sir ise speed se aaj hi complete krwa doge Javascript ko 😂😂😂😂 Thnx sir ise derailed course lane ke liye 🙇🙇🙇🙇
@sufiserious798
@sufiserious798 4 ай бұрын
Detailed*
@RahulSharma-lw2ss
@RahulSharma-lw2ss Ай бұрын
Thankyou for this amazing series
@swapnildapkosh2813
@swapnildapkosh2813 4 ай бұрын
Hitesh Sir, Thanks 🙏
@TheSuyash08
@TheSuyash08 8 ай бұрын
Awesome Explanation, Hitesh ji.
@rohitsingh04141
@rohitsingh04141 9 ай бұрын
Amazing explanation! Thank you sir.
@RagSingh-e2e
@RagSingh-e2e 10 ай бұрын
best Series ALL OVER THE UNIVERSE, thank you Sir 🙏
@singhkr
@singhkr 8 ай бұрын
thanks a lot for the real world examples that is best thing about your videos
@SoikatDey-ly8vi
@SoikatDey-ly8vi 6 ай бұрын
Mind blowing classes💕
@CheatCodePython
@CheatCodePython 3 ай бұрын
kar liya subscribe sir ji. Sir your teaching style is awesome, I really like it. Thank you for your effort.
@chaiaurcode
@chaiaurcode 3 ай бұрын
Keep watching
@dynamiczonex
@dynamiczonex Жыл бұрын
one of the best series in youtube sir your efforts hats off👍
@jk-sm6qr
@jk-sm6qr 9 ай бұрын
Really, very informative video.... Thank you so much
@sachinnarwade1359
@sachinnarwade1359 Жыл бұрын
Truly❤ A man of commitment 👌🏼👌🏼🙏🏽🙏🏽🙏🏽
@Umarfaooqkhan-dev
@Umarfaooqkhan-dev 3 ай бұрын
i love your teaching sir thanks a lot
@harshsajla521
@harshsajla521 9 ай бұрын
sir i'm in love with your teaching style can't express how good I'm feeling to find this channal 🥺
@debasissahoo4997
@debasissahoo4997 Жыл бұрын
really like your lectures sir.baht maja aatahe jab appse padhneko milta he , i love you sir.
@prateeksharma3775
@prateeksharma3775 10 ай бұрын
khub bhaloo explaination sir...
@dingo_5998
@dingo_5998 Жыл бұрын
Dhanayavad Guru G🚩✌
@learncode5110
@learncode5110 Жыл бұрын
Sir maja aagya.. ye huwina baat..topics sab cover horahehy... soon react is on the way
@nikhitazulka9693
@nikhitazulka9693 11 ай бұрын
Amazing explanation! Thank you sir.
@JAYESH_THAR_1409
@JAYESH_THAR_1409 4 ай бұрын
yes!
@AbhishekChoudhary-p1h
@AbhishekChoudhary-p1h 11 ай бұрын
Superb sir, thanks for the video ❤
@vaibhavlutade
@vaibhavlutade 11 ай бұрын
Superb sir, thanks the video ❤
@start.learnings1
@start.learnings1 9 ай бұрын
The best dialogue of complete series "Kaun sa interview nahi nikalne wala, yahi se nikalwayenge"
@aadityapuri1061
@aadityapuri1061 Жыл бұрын
There is a doubt in my mind. This call function is okay, like we can use call to use the reference of other function's execution context. But when we use "this" keyword in the function which is called by the call method then it will always access the other function's execution context, what if I also want to refer to my context. Eg: What if I want a variable named as "username" (whose context refers to its parent function only) in the mentioned example's SetUsername method. "this.username" always gives me context of createUser and append a new child always.
@anujpoudel
@anujpoudel 11 ай бұрын
what is wrong with passing the context through arguement?? function setName(ctx, name){ ctx.username = name; } function createUser(name, email){ setName(this, name); this.email = email; }
@sukhii0220
@sukhii0220 3 ай бұрын
because it is not the write way to do it:- you can declare createUser as constructor so that this refer to the new instance of an object. const user = new CreateUser ('yourname', 'yourmailid' );
@simp-chan7578
@simp-chan7578 Ай бұрын
you misunderstood 'this' keywrd with variable. 'ctx' you used is avariable passed as argument. both are completely different bro
@shivaay8215
@shivaay8215 6 ай бұрын
itna toh chai bhi ni piya hoga jitna chai word sun chuka hun lectures me....😆😆
@this_is_Shreya
@this_is_Shreya 11 ай бұрын
Just amazing explanation.. Huge respect, sir
@yashjakhar3141
@yashjakhar3141 2 ай бұрын
one of the best couses ever
@aggsha7580
@aggsha7580 4 ай бұрын
Thanks A Lot Sir ❤❤
@sambitsuvankar1487
@sambitsuvankar1487 Ай бұрын
very well explained sir
@manemanoj3068
@manemanoj3068 Жыл бұрын
Definitely i didn't watch previous videos but it looks like U are on fire bhaiya...❤❤❤
@chaiaurcode
@chaiaurcode Жыл бұрын
Thanks a ton
@azeemdeveloper4815
@azeemdeveloper4815 10 ай бұрын
I followed a channel to learn DSA but I left because he is always making videos 1hour or for no use and concentrating on his watch time. but you are the perfect, literally very nice series in less time. I am requesting for DSA series also.
@vaibhavsingh3453
@vaibhavsingh3453 11 ай бұрын
Thank you sir ❤🙏
@shivamsahi8160
@shivamsahi8160 Жыл бұрын
Maja aagya❤❤❤
@rajeshkanna1829
@rajeshkanna1829 8 ай бұрын
Call is by default then ... closure na 11:03
@SenseiVraj
@SenseiVraj 5 ай бұрын
Ji ha yahi se niklenge sare interviews
@Dev-Phantom
@Dev-Phantom 9 ай бұрын
Deep understanding
@malik-pureheart3452
@malik-pureheart3452 9 ай бұрын
Bohat Alla😍
@akroyalmaker
@akroyalmaker 7 ай бұрын
Like for a tea ☕
@sahityasingh5289
@sahityasingh5289 5 ай бұрын
Thanks a lot 🙏🏻❤
@junaidahmed820
@junaidahmed820 Жыл бұрын
G.O.A.T Hitesh sir ❤
@iamakashkumarram
@iamakashkumarram Жыл бұрын
Another Masterpiece ❤
@BitFire007
@BitFire007 9 ай бұрын
"Chai aur Code, your videos are like a friend guiding me through the fascinating world of JavaScript!"
@priyankagehlot9945
@priyankagehlot9945 6 ай бұрын
Thankyou Sir 😀❤
@MohitSingh-jb9tb
@MohitSingh-jb9tb 3 ай бұрын
Nice Explanation
@sumantagorai5880
@sumantagorai5880 Жыл бұрын
Great explanation, Sir. ❤
@joydipsarkar724
@joydipsarkar724 Жыл бұрын
another masterpiece of a video explanation❤
@mukeshutmani
@mukeshutmani 8 ай бұрын
masterpiece series
@animeshgupta7288
@animeshgupta7288 5 ай бұрын
Amaziiinnnnngggggggggggg Explaination
@tanishkagupta6864
@tanishkagupta6864 Жыл бұрын
Loved it sir 💖
@jayeshbagul3961
@jayeshbagul3961 Жыл бұрын
Your hindi😍, i loved it
@digiheadwaybusiness9204
@digiheadwaybusiness9204 Жыл бұрын
smaj me to aa geya hai subscrib to hum ne phle se hi ker rkha hai, ab to bess like ki daree thi wo bhi ker diya hai :) aap bus content le ker aaty jaye like and share ki chinta chood hi do aap wo to hum aap ke bina khay bhi ker dengay !! kya kery kerna pedta hai content hi etna jada acha hai ki, button like per jaye bina rukta hi nhi :) (:
@abdulmatania8155
@abdulmatania8155 Жыл бұрын
awesome explanation sir
@AmarSingh-uw1db
@AmarSingh-uw1db Жыл бұрын
Gratitude Sirji ❤❤❤
@DavidBedford-b8f
@DavidBedford-b8f Жыл бұрын
quality content❤
@soumadip_banerjee
@soumadip_banerjee Жыл бұрын
Lovin the series!
@kashidasmongre
@kashidasmongre 9 ай бұрын
Thank you very very much sir Ji
@AnshuKushwaha-xz8di
@AnshuKushwaha-xz8di 4 ай бұрын
software expert Hitesh Choudhary 😅
@relaxation_music-7ym
@relaxation_music-7ym 9 ай бұрын
Thank You Sir ❤❤
@BOSS55
@BOSS55 11 ай бұрын
thanks ji
@AnonymousPerson-x6t
@AnonymousPerson-x6t 6 күн бұрын
thankyouuuuuu so much sirrrrrrrrrr
@OOAK_India
@OOAK_India 9 ай бұрын
love you sir!
@jrahul42
@jrahul42 4 ай бұрын
nice explanation
@EjazAli-h4c
@EjazAli-h4c 4 ай бұрын
Thank you so much sir
@arshitcc
@arshitcc 8 ай бұрын
Thank You Sir
@shivanshuhere
@shivanshuhere Жыл бұрын
Learnt call, when on a call 😂🔥
@rZERO_game
@rZERO_game 10 ай бұрын
Mera ek question hAY: HTML,CSS,PHP,JS,MYSQL YEH SAB SIKH KAR KYA iot RELATED PROFESSIONAL LEVEL CODE KAR PAUNGA, YA ISMAY BHI AUR BAHUT KUCH SECURITY LOOP HOLS, SCALABALITY ISSUE AYEGA?
@amanjeetsinghsaluja5246
@amanjeetsinghsaluja5246 Жыл бұрын
awesome you explain
@AliAsif-d8f
@AliAsif-d8f Жыл бұрын
hbaiya apka experience apki teaching m proper kam ata nazar ata hai
@its_Amit_00
@its_Amit_00 5 ай бұрын
#this
@Kaleemsipra1
@Kaleemsipra1 Жыл бұрын
love and respect for you sir
@ronitvardhamane6893
@ronitvardhamane6893 Жыл бұрын
at 12:00 what if i use return from SetUsername function and hold it in a variable in Createuser function??
@anandmaurya6384
@anandmaurya6384 3 ай бұрын
Thanku sir
@mdnaimhossen3211
@mdnaimhossen3211 Жыл бұрын
love and respect for you sir
@Vaibhav-y6b
@Vaibhav-y6b 6 ай бұрын
nice sir very nice
@ankushladani496
@ankushladani496 Жыл бұрын
Dhanyawad guruji 🙏
@30sunique78
@30sunique78 Жыл бұрын
chaiaurcode >>>>> All KZbinr 😂 content creator be like Lagta hai Students Smart ho gye hai kyuki bo chaiaurcode ko subscribe krne lage hai😂 or chai ki tarah depth me chijo ko sikh rhe hai
@Suraj.5260
@Suraj.5260 Жыл бұрын
thank u sir ...
@mdtausifahmed6205
@mdtausifahmed6205 5 күн бұрын
this is similar to prototypal inheritance
@hyphengamerandtech3064
@hyphengamerandtech3064 2 ай бұрын
great
@ashishkumarranjan808
@ashishkumarranjan808 11 ай бұрын
Amzing
@mohammadabbas1623
@mohammadabbas1623 Жыл бұрын
Showering of video sir ❤
Class constructor and static | chai aur #javascript
26:36
Chai aur Code
Рет қаралды 99 М.
Magic of Prototype in javascript | chai aur #javascript
48:08
Chai aur Code
Рет қаралды 153 М.
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
THIS and arrow function in javascript | chai aur #javascript
18:29
Chai aur Code
Рет қаралды 228 М.
How does javascript execute code + call stack | chai aur #javascript
26:12
2.5 Years Experienced Best JavaScript Interview
2:03:06
Anurag Singh ProCodrr
Рет қаралды 335 М.
Bind in javascript | chai aur #javascript
11:39
Chai aur Code
Рет қаралды 66 М.
Now you know Objects in Javascript | chai aur #javascript
19:46
Chai aur Code
Рет қаралды 56 М.
Object Oriented in Javascript | chai aur #javascript
32:03
Chai aur Code
Рет қаралды 177 М.
Higher Order Function | javascript interview series
11:46
Hitesh Choudhary
Рет қаралды 37 М.
JavaScript prototype in Hindi  | Examples | Interview Questions
27:31
Code Step By Step
Рет қаралды 34 М.
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН