🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details
@Solo_playz2 жыл бұрын
Hii brother can I get to know what's your age ??
@RoadsideCoder2 жыл бұрын
@@Solo_playz 24
@Solo_playz2 жыл бұрын
@@RoadsideCoder Great man are you an IITian
@RoadsideCoder2 жыл бұрын
@@Solo_playz No, I'm from a tier 3 college
@Solo_playz2 жыл бұрын
@@RoadsideCoder What is tier 3 ??
@xen00762 жыл бұрын
You are an absolute genius, i never understood this concept but your teaching is just fabulous, i hope that you launch your own udemy course in a structured way to master JS. You deserve to get paid for such content
@RoadsideCoder2 жыл бұрын
Thanks a lot mate ❤️
@shubhamkharadkar37536 ай бұрын
00:02 Understanding 'this' keyword in JavaScript 02:11 Understanding 'this' keyword in different contexts 04:14 Understanding 'this' keyword in JavaScript 06:32 Understanding 'this' keyword in normal function and arrow function 08:41 Understanding 'this' keyword in JavaScript object 10:37 Accessing 'this' inside a function can be tricky. 12:42 Understanding 'this' keyword in JavaScript 14:49 Understanding 'this' keyword in different functions 16:50 Understanding 'this' binding in JavaScript. 18:38 Understanding 'this' keyword in JavaScript functions 20:40 Example of chaining functions in JavaScript 22:32 Upcoming video on Explicit Binding
@purusharma81922 жыл бұрын
this channel is highly addicted,i have seen more than 10 videos continously
@RoadsideCoder2 жыл бұрын
Hahah good to know ❤️
@purusharma81922 жыл бұрын
@@RoadsideCoder you are awesome😎
@ismailshaikhdev9 ай бұрын
This series is Onepiece of Javascript
@harshdeepbilaiya30762 жыл бұрын
this is some excellent practice material. pls add more o/p based Qs for OOJS, Prototypes, etc. an addition to the problem at 17:25 - if at line 4, we use let/ const instead of var to create 'length' variable, then while executing 'callback', the (this) Window object won't have length set to 4. It could be anything, like in JSFiddle, it is set to 0. since let/ const are created in TDZ. there can be so many more variations to this problem. i find this an incredible practice problem. many thanks!
@AkramDevTalks Жыл бұрын
Great explanation! A more accurate answer would be : In an arrow function "this" is a part of its closure, i.e. it is taken from the context. Where it is defined and not the object in which it is defined. In a normal function "this" is points to the object it is a part of.
@dhananjaygupta85542 ай бұрын
This is blowing my mind 😮
@RoadsideCoder2 ай бұрын
full playlist here - kzbin.info/aero/PLKhlp2qtUcSaCVJEt4ogEFs6I41pNnMU5&si=wrbL8KA4a4fxHNRN
@ivanshoshkov2 жыл бұрын
I havent seen more detailed videos on coding subjects than yours! Thank you!
@RoadsideCoder2 жыл бұрын
Haha, Thanks man!
@anubhapant522710 ай бұрын
Just learned so many new things from this video. The last ques is just amazing. Please make more such video of questions like the last one. Highly informative content 👌✌
@shash0_08 ай бұрын
This is some really high quality content and all for free! Your curation of questions are impressive, really making me scratch my head. Thank you mate!
@RoadsideCoder8 ай бұрын
Thanks man! Full course here - roadsidecoder.com/course-details
@shash0_08 ай бұрын
@@RoadsideCoder For sure. I'll buy your courses the first thing I get a job lol. Also do you have a patreon.
@lann1sterroy4 ай бұрын
Thank you Piyush, great explanations as always.
@vincent35422 жыл бұрын
Unbelievable video! I like all your Playlist about react and javascript... Love from indonesian 👍
@kartik77752 жыл бұрын
Thank you so much! You're my favorite teacher.
@sanjaytk5 ай бұрын
Thanks Piyush, your roadside coding clears so many doubts related to "this" 🤟🙏🙏
@RoadsideCoder5 ай бұрын
Glad to hear that
@navneet86382 жыл бұрын
Bhai Apka Knowledge toh kamal ka hai🖤🖤🖤
@RoadsideCoder2 жыл бұрын
🙏❤️
@MukeshKumar-bt5gb2 жыл бұрын
Thanks, Was waiting for this! I was asked many questions regarding this in Cars24 interview this week 😄
@RoadsideCoder2 жыл бұрын
Oh great
@akshayshinde24032 жыл бұрын
Question 6 & 7 are just mind blowing.
@shrushtipolekar88042 жыл бұрын
Extremely helpful video! Helped me to develop a more clear understanding of 'this' keyword . Please keep on making more such output based questions videos.
@RoadsideCoder2 жыл бұрын
Yes, So many more on the way!
@fares.abuali2 жыл бұрын
Thank you so much! This is so informative 💖
@itsMohak Жыл бұрын
You are splendid
@ninjaplavi2 жыл бұрын
I know it is a generalization, but many Indian devs seem to have issues with following naming best practices and I can't figure out why that is...On a more serious note, great videos, well structured and researched.
@de-stressmusic4322 жыл бұрын
This is because the whole video is a copy of an article by dmitripavlutin, my previous comment mentioning it was deleted.
@touseef_baba_0074 ай бұрын
@@de-stressmusic432 Its was helpful to have a written article
@front-end-world8 ай бұрын
I was recently asked a question on what is the difference between invoking the object directly suing the method & using call I did not know this implicit bindings vs explicit binding Great one kudos piyush :)
@bruhathimusicalwings15032 жыл бұрын
gem of explanation ...thank you
@himanshupandey34512 жыл бұрын
on 17:56 the same code run on browser and node console return different result. on node console it return undefined?
@simionandrei54092 жыл бұрын
Great video! Are you going to drop some videos related to OOP Concepts(constructor, class) or Prototype Inheritance?
@RoadsideCoder2 жыл бұрын
Yes, definitely if more people ask for it!
@manojradharapu46882 жыл бұрын
@@RoadsideCoder pls do it , then more people will watch and subscribe like me
@techupdate032 жыл бұрын
@@RoadsideCoder yes sir..I also interested. After that can you explain about promise from scratch.
@kalyanyadlapalli61032 жыл бұрын
@@RoadsideCoder yes please drop a video brother
@ashwaniagrawal7002 жыл бұрын
@@RoadsideCoder yes, need some good videos on OOP concepts
@AmirHussain-dd6zw2 жыл бұрын
You have great variety of questions
@charankumarbasam58662 жыл бұрын
this with arrow function is greatly explained. thank you
@RoadsideCoder2 жыл бұрын
Welcome ❤️
@vinithaboyidi3354 Жыл бұрын
Great explanation!! Thanks
@BCSBhaveekJain Жыл бұрын
At 14:50 we can do "setTimeout(user.logMessage(), 1000);", its giving correct output. We can do this also " setTimeout(user.logMessage.bind(user), 1000);"
@AmolAghav2 жыл бұрын
Question 5 was amazing! Thanks!
@abhishekkumar-ot4zo7 күн бұрын
4:06 this keyword in a function with in an object points to the object 4:43 this keyword in a function with in a nested object points to the nested object
@kalynndier65242 жыл бұрын
I absolutely LOVE your videos. You are amazing at explaining everything and for the first time EVER, I finally get it! Thank you. Do you have patreon? I'd love to support you.
@shubhamkakad10x6 ай бұрын
thank you because of you I understand this
@RoadsideCoder6 ай бұрын
Thanks, u can check the complete course here - roadsidecoder.com/course-details
@ambeshtiwari99778 ай бұрын
thank you Roadside coder .
@RahulKumar-ew1qw2 жыл бұрын
Bro u make me great than my yesterday. Thank you ...
@RoadsideCoder2 жыл бұрын
Great to hear that brother!
@imtiazalikhan27092 жыл бұрын
Bro, your output based questions are Awsome.👋
@RoadsideCoder2 жыл бұрын
Thanks dude!
@SonuKumar-tw1oi Жыл бұрын
Please make a video on class , and its relation with this...Your content and teaching is fabulous.
@nishachapte72 жыл бұрын
Thank you so much..amazing content.
@RoadsideCoder2 жыл бұрын
Most welcome!
@mohininarwade1108 Жыл бұрын
Hi Dear… I am really a big fan… You have such a deep knowledge of almost every technology. I have 1 request… Do you have any idea about how can we call salesforce commerce cloud API from Angular??? please reply if you know this or make a short video. Thanks
@varunparihar371710 ай бұрын
this was great..can you please make videos on node,express,mongo too. That would be extremely helpful since you explain things quite nicely.
@chiragsheth22632 жыл бұрын
13:50 logs name when we use parenthesis in front logMessage method invocation.... Or if you set user property using let keyword
@mohdraqim2571 Жыл бұрын
var length =4; function callback(){ console.log(this.length); } const object ={ length :5, method(fn){ fn(); }, }; object.method(callback); it giving undefined instead of output 4 anyone?
@brakesh1273 Жыл бұрын
Ya facing the same issue
@hellochenyu Жыл бұрын
Can you please help expain in 18:02? Why the nested fn() is targeted the global window object? Thanks!
@RoadsideCoder Жыл бұрын
watch my functions video, u will understand it
@parmarhitendrasinh45042 жыл бұрын
Amazing Video's ♥️
@RoadsideCoder2 жыл бұрын
Thanks dude
@angryman9333 Жыл бұрын
I love this
@shreymaurya33442 жыл бұрын
Amazing Video🥳
@RoadsideCoder2 жыл бұрын
🙏❤️
@ankushladani4962 жыл бұрын
Yes we want video on class,new keyword , etc....
@UtkarshSinghP Жыл бұрын
THIS IS GOLD
@rahulvanave2 жыл бұрын
Yes Please make video on class as well
@pushpabhandari6192 жыл бұрын
Helpful!! , thank you ❤
@RoadsideCoder2 жыл бұрын
Welcome!
@dharmeshgohil93752 жыл бұрын
Awesome👍👍👍
@RoadsideCoder2 жыл бұрын
Thank you! Cheers!
@deepakverma20712 жыл бұрын
Great video bro! Keep coming up with interesting videos like these ❤️. Just adding one more concept here Arguments in a function is not an array it is array like object. Array like object does not have all the properties of an array like map, filter etc.
@RoadsideCoder2 жыл бұрын
Thanks for this important detail
@tpadma74198 ай бұрын
yes please make a video on constructors and this🙏
@RoadsideCoder8 ай бұрын
You can find this and other topics here - roadsidecoder.com/course-details
@abhishekvishwakarma90452 жыл бұрын
fact is `this` is the least thing we will ever gonna use (class based is exception) in our day to day work, this makes this concept tougher but interviewers love this type of question lol😆, btw Awesome video 🔥
@RoadsideCoder2 жыл бұрын
That's not true, if your company is using let's say class based component in react, it will use 'this' a lot
@abhishekvishwakarma90452 жыл бұрын
@@RoadsideCoder Completely agree forget about class based ✌but we're shifting towards functional based programming 😌
@ProgrammingWithProject2 жыл бұрын
Please continue this series
@sidhishkumar2 жыл бұрын
yes Please create a deep tutorial on class and constructor
@lifeisbeautifu12 жыл бұрын
Thank you
@sajalgupta73452 жыл бұрын
My solution for Question 2: function user() { return { name: "Sajal", ref: this } } const test = user(); const result = user.bind(test); console.log(result().ref.name); //Sajal I tried it with .bind() 😀
@RoadsideCoder2 жыл бұрын
Good job!
@Saikumar-kb4lf2 жыл бұрын
This is really good content. I can't deny that. But definitely here 'this' was explained in a hacky way. Please watch this related video from dev sage and you can really master this
@RoadsideCoder2 жыл бұрын
Thanks, The main aim of this video is to assist for Javascript Interviews, therefore the hacky way.
@riturathinsharma59312 жыл бұрын
This always sounds confusing. Just the easiest way to interpret. Its always the caller function for the normal function calls and for the arrow functions it will always be 2 level deeper( kind of like parent of parent)
@abd118682 жыл бұрын
14:08 piyush, can we do bind as well here? because I think once we bind a method with a object, no matter when/where we call that function it will always point to that object.
@krunaljoshi7390 Жыл бұрын
Really good content, make some practice platform
@ShivamKhantwal946 ай бұрын
bro what's your approach for learning these type of concepts in depth?
@VivekG-e1o Жыл бұрын
Please make a video on session and local storage with Json.stringify , parse , constructors and classes also.
@anejasahil2 жыл бұрын
Dude just got introduced to your channela few days back your content is amazing, keep going man!!
@RoadsideCoder2 жыл бұрын
Welcome aboard! And thanks a lot. ❤️
@anandstephan60203 ай бұрын
for all the viewers i give the golden rule * object don't create binding with this function do in js for e.g let obj = { name:"steve", valueOfthis:this, arrowFn:()=>this, normalFn:function(){ return this } } here valueOfthis and arrowFn always gives window why because object don't create binding with this and arrow function also not create binding with this whereas normalFunction create binding with this hope this explanation work 😀😀
@parmaryash44062 жыл бұрын
Supep video
@RoadsideCoder2 жыл бұрын
🙏
@GopalAkkar-h9b Жыл бұрын
Can you add interview series for Angular ? It will be really helpful for us as angular developer.
@jayantsharma26692 жыл бұрын
Hey Piyush, thanks for this awesome video. Please correct my understanding if I am wrong: print is defined inside obj and obj don’t have its own scope its inheriting the scope from its parent which is global object that’s why arrow function pointing to global object (bcz it inherits this from lexical scope) . let obj = { name : 'temp', print : () => { console.log(this); // global/window object } }
@RoadsideCoder2 жыл бұрын
It doesn't matter what scope obj has, arrow function takes its scope from parent normal function which in this case is not there, so it is targeting global. So even if the arrow function nested deep inside a object, if it doesn't have a parent normal function, it act the same.
@jayantsharma26692 жыл бұрын
@@RoadsideCoder Ok got it, arrow function search for nearest regular function that encloses it but in this case its not enclosed by any regular function then global this is inherited by arrow function.
@RoadsideCoder2 жыл бұрын
@@jayantsharma2669 Yes!
@ProgrammingWithProject2 жыл бұрын
Please tell the references point from where you learned all the core concepts of javascript
@RoadsideCoder2 жыл бұрын
mdn docs
@tharapearlly17362 жыл бұрын
Have you come across any practice sites that help us sharpen these skills?
@acchugowda77672 жыл бұрын
Please release next vedio on bindings as soon as possible.
@charuhas1602 Жыл бұрын
Piyush please create video on class, prototype inheritance, and new feature of javascript
@neeraj-u6e2 жыл бұрын
Make video for everything in javaScript ..
@RavindraSingh-lp9pl10 ай бұрын
please make video on class and constructor in Javascript
@ShivamSingh-ct1ix Жыл бұрын
Hello Can you make a video on OOPS concept in javascript.
@DevangPatil2 жыл бұрын
Nice.
@divyasampath2843 Жыл бұрын
Video on class and constructors please!!
@RoadsideCoder Жыл бұрын
Soon!
@0Ipsita0 Жыл бұрын
Make video on class, constructors video please, i don't understand those
@divasbhadani9225 Жыл бұрын
where we can practice all those types of question ?
@PIYUSH-lz1zq2 жыл бұрын
sir , can u make videos to make nested comment section and folder structure using JS
@RoadsideCoder2 жыл бұрын
Sure, Noted!
@sequoiakanies22026 ай бұрын
Great video as always. Btw you are saying and spelling “substract” instead of “subtract”
@avinaymishra83452 жыл бұрын
please make oops concept on javascript in details
@mastpahadan4902 жыл бұрын
you go boy!!!!❤️❤️
@RoadsideCoder2 жыл бұрын
🙏❤️
@mohitarya5189 Жыл бұрын
Hello can anyone tell me where I can get the javascript output based questions
@vishaltp60832 жыл бұрын
hey , where can we find these kind of other questions
@shubhanshusahuu8 ай бұрын
Why calling user.method() inside console.log is not called as callback??
@ammanmoini12022 жыл бұрын
sir what is window object and global object? plz explain a bit..
@RoadsideCoder2 жыл бұрын
Hey, you can refer to this - developer.mozilla.org/en-US/docs/Web/API/Window
@abhirocks7239 ай бұрын
Hey guys .. can anyone explain why window.ref.name is not undefined and it is empty?
@dharmeshgohil93752 жыл бұрын
can you make a video of stripe payment plzzzzzzzzzzzz in hindi
@s1k_guy2 жыл бұрын
Bro why dont you create javascript vedios on basic data structure algorithm so it will help in interviews.
@RoadsideCoder2 жыл бұрын
Yes I have planning that, coming soon!
@ayushyadav88512 жыл бұрын
The day this video got published i was asked the calc question and i messed up because of 'this' reference
@techycode22179 ай бұрын
So What' difference if you upload same video in your paid course and and youtube ?
@RoadsideCoder9 ай бұрын
Here's your answer - www.linkedin.com/feed/update/urn:li:activity:7174019126041018370/?originTrackingId=GTshFzTMQBqFiLZrQQuBNw%3D%3D
@bluevojka9 ай бұрын
Hi, can anyone please explain 18:01
@hemamane739 Жыл бұрын
let user = { name :"hema mane!", getName(){ console.log(this.name) } } let data =setTimeout( user.getName() ,1000) console.log(data) console.log(data) ---> is it correct way of accessing or else mandetory to use inside function only
@PIYUSH-lz1zq2 жыл бұрын
bhaiya , make a small js project which consist of these js concepts of debouncing , throttling etc.. placements r comming
@RoadsideCoder2 жыл бұрын
Ok bro, noted!
@ketandutt2 жыл бұрын
Q3. it should be setTimeout(user.logMassage(), 1000) //() missing