I want to point out a mistake on 40:10. The Object.create should be before adding new methods. In example above, fightCrime() is the new method, if Object.create is after fightCrime(), that method won't work. You only called getFullName() method in the video so it seems everything works fine. Prototype object cannot be assigned after new methods. All-in-all, great tutorial, keep it up!!
In this code, th e outer function returns a reference to the inner function by using return inner. This is called returning a function as a value, or returning a function reference. If the outer function had used return inner(), it would have returned the result of invoking the inner function instead of a reference to the function itself. This means that the fn variable would be assigned the value returned by inner(), which is undefined since the inner function does not return anything. By returning a reference to the inner function, we can assign it to the fn variable and then call it multiple times using the fn() syntax. This allows us to create a closure where the inner function retains access to the counter variable even after the outer function has completed execution, as explained in my previous answer. So, in summary, return inner returns a reference to the inner function, which can be stored and invoked later using the fn() syntax, while return inner() would have returned the result of invoking the inner function immediately, which is not what we want in this case.
Hello Vishwas! I'm a huge fan of yours You videos are really high quality and you have the skills to explain complex things to others in a very easy way I have learned a lot of things from you Thank you very much for all of this quality content This is better than most of the paid ones as well Hope you get more subscribers soon !
I am enjoying watching and learning from this course. I would recommend anyone looking to learn Advanced JavaScript topics. Please watch the prerequisites videos before watching this course. Best of luck everyone. Big thanks to the content creator! You are absolutely wonderful and my best wishes for your wellbeing.
Great course. There are not many advanced courses that has covered all well-known advanced topics. I am glad i check this one out. Would love to watch if you already have any advanced Nodejs crash course or if we are going to get one soon :)
First part was clear, and superb, this video is quite confusing, mostly because of impractical examples which do not represent real scenarios. Must change at least the currying example.
he's clearly saying that this are the fundamentals of those concepts, real scenarios might take a longer video just to cover one of those concepts, this course gives the viewer enough knowledge to go and expand those concepts by themselves, do not expect to learn absolutely everything from a video , btw, you are free to google "real scenarios for currying methods".
sir i m a beginner ,i watched many tutorials from different sources but the quality and content u give provide has no match....i just stick to learning just bcoz of u sir
Something wrong in the closures section your logging the counter 1,2 in console while the function is not returning a value so it is undefined If we add return in the inner function then the value is 0,1 not 1,2
Be careful about difference between writing 'inner' and 'inner()'. As far as i understand, when we wright inner and gave to the fn: we are giving the function itself but not the function's return value. I hope this help.
When you want to return a function from another function and create a closure, you should return the function itself without invoking it. In other words, you should return inner; (without parentheses) and not inner(); (with parentheses). Returning the function without invoking it allows you to create a closure, which means that the inner function retains access to its containing scope and any variables defined in that scope function outer() { let counter = 0; function inner() { counter++; console.log(counter); } return inner; // Return the inner function without invoking it } const increment = outer(); // Store the inner function in a variable increment(); // This logs "1" increment(); // This logs "2" Without closure function outer() { let counter = 0; function inner() { counter++; console.log(counter); } return inner(); // The inner function is immediately invoked when you return it using return inner(); } outer(); // This logs "1" and returns undefined outer(); // This logs "1" and returns undefined
To undestand closures, just imagine inner function as a normal function in global scope which is outer function. How i get it is like in global scope when you increment something with function it stays to that value and for inner function outer is global scope.
hey Sir, thank you for uploading such a great stuff, I do watch your tutorials, you cleared all my concepts, you are a great teacher, alots of love for you from Pakistan
Checkout my other crash courses!
HTML Crash Course - th-cam.com/video/N8YMl4Ezp4g/w-d-xo.html
CSS Crash Course - th-cam.com/video/Icf5D3fEKbM/w-d-xo.html
CSS Flexbox Crash Course- th-cam.com/video/z62f2k38s64/w-d-xo.html
CSS Grid Crash Course - th-cam.com/video/p4Ith5qRM1g/w-d-xo.html
JavaScript Fundamentals Crash Course - th-cam.com/video/XIOLqoPHCJ4/w-d-xo.html
Asynchronous JavaScript Crash Course - th-cam.com/video/exBgWAIeIeg/w-d-xo.html
Please Make video about react frame motion Thanks ...
Make a ReactNative course too, plz! I mean, in a series!
all courses are crystal clear thankyou
Just 10 mins and the way you explain things is perfect. I've watched countless tutorials before and you really explain awesome.
To the point and no extra useless stuff taught only what is needed. just what i was looking for.
Thank you So much.
I want to point out a mistake on 40:10. The Object.create should be before adding new methods. In example above, fightCrime() is the new method, if Object.create is after fightCrime(), that method won't work. You only called getFullName() method in the video so it seems everything works fine. Prototype object cannot be assigned after new methods. All-in-all, great tutorial, keep it up!!
Thank you. I was looking for this solution. 😇
Ok I'm not crazy 😅
I’d love to watch it now, but it’s 2am and I know I’m going to get brain blasted. Saving for later instead ;)
Same here but it’s 3:28 instead saving for later
Rr
Bet you didn't watch later
I know this feeling.
Same here but it's 01:10am😴 dis side😂
Absolutely awesome. Finally someone who can explain things in the right pace and kept me engaged for whole video.
In this code, th
e outer function returns a reference to the inner function by using return inner. This is called returning a function as a value, or returning a function reference.
If the outer function had used return inner(), it would have returned the result of invoking the inner function instead of a reference to the function itself. This means that the fn variable would be assigned the value returned by inner(), which is undefined since the inner function does not return anything.
By returning a reference to the inner function, we can assign it to the fn variable and then call it multiple times using the fn() syntax. This allows us to create a closure where the inner function retains access to the counter variable even after the outer function has completed execution, as explained in my previous answer.
So, in summary, return inner returns a reference to the inner function, which can be stored and invoked later using the fn() syntax, while return inner() would have returned the result of invoking the inner function immediately, which is not what we want in this case.
Teacher of the year! 🥳 I appreciate that it seems that you know what questions we are going to ask ourselves and you cover every case.
fegasf
Hello Vishwas!
I'm a huge fan of yours
You videos are really high quality and you have the skills to explain complex things to others in a very easy way
I have learned a lot of things from you
Thank you very much for all of this quality content
This is better than most of the paid ones as well
Hope you get more subscribers soon !
Interviewing next week and need a refresher! Thanks for this!
Are you a talent acquisition member?
I love the way you explain difficult concepts in a very simple manner
A very nice and clean explanation of difficult concepts in short video. Thanks so much Vishvas. You are great teacher indeed.
I am enjoying watching and learning from this course. I would recommend anyone looking to learn Advanced JavaScript topics. Please watch the prerequisites videos before watching this course. Best of luck everyone. Big thanks to the content creator! You are absolutely wonderful and my best wishes for your wellbeing.
so it's not aged?, I want to learn but skeptical if this keeps up with the latest js
Great course. There are not many advanced courses that has covered all well-known advanced topics. I am glad i check this one out.
Would love to watch if you already have any advanced Nodejs crash course or if we are going to get one soon :)
Wow best teacher on TH-cam for front end.
In currying example, the innermost function does not return a passed-in function instead it is returning the result of the passed-in function
Just watched one hour before an interview..you sir might got me my new job offer
there are very less resources on design patterns in JS can you please consider one series 🙏🙏🙏
Yes Design Pattern Is One Personally want
@@harshrastogi296 Is one that i personally want*
@@hexadecimalhexadecimal5241 is the one i personally want*
want the same...
@@jim_from_it3261 i was fixing his sentence without changing it mine wasn't wrong tho
Thank you for this crash course and async js I truly needed them.
First part was clear, and superb, this video is quite confusing, mostly because of impractical examples which do not represent real scenarios. Must change at least the currying example.
he's clearly saying that this are the fundamentals of those concepts, real scenarios might take a longer video just to cover one of those concepts, this course gives the viewer enough knowledge to go and expand those concepts by themselves, do not expect to learn absolutely everything from a video , btw, you are free to google "real scenarios for currying methods".
Amazing tutorial Vishwas. You rock man.
Greatest teaching ever. Give this man a Grammy 16:43
Wow... This is great! Hope to finish this within a month..
i really love your teaching style it's awesome
Very nice video, thanks for the explanations!
My friends think that you talk like a robot, but I like your voice it sounds professional
Thank you very much!
It would get better if you could add more real world examples after each chapters.
sir i m a beginner ,i watched many tutorials from different sources but the quality and content u give provide has no match....i just stick to learning just bcoz of u sir
Please do a crash course on Dom and async js
Something wrong in the closures section your logging the counter 1,2 in console while the function is not returning a value so it is undefined
If we add return in the inner function then the value is 0,1 not 1,2
Be careful about difference between writing 'inner' and 'inner()'. As far as i understand, when we wright inner and gave to the fn: we are giving the function itself but not the function's return value. I hope this help.
Great thanks
Awesome course 💫 covered many important topics.
I finally get curried functions! Thank you!!!!
This video was really helpful, thank you for the explanations.
And by the way I may have guessed that you are a fan of DC Comics
Thanks a lot it refreshes the concepts in very clear way. Great teaching. Thanks Vishvas.
thank you, sir, I wanted a course like this only
One of the best resources for learning javascript.👍 excellent beginner-friendly examples.
thanks teacher. prototype part is the most hard one to understand personally
Superb! Great clarity and understanding. Thanks.
I needed to watch this video before my last interview
did u crack the interview
@@saran8287 no )))
12:33 FN parent disease, FN parent disease
Thank you so much, you help me a lot!
Excellent. Onto advance js 😊
When you want to return a function from another function and create a closure, you should return the function itself without invoking it. In other words, you should return inner; (without parentheses) and not inner(); (with parentheses).
Returning the function without invoking it allows you to create a closure, which means that the inner function retains access to its containing scope and any variables defined in that scope
function outer() {
let counter = 0;
function inner() {
counter++;
console.log(counter);
}
return inner; // Return the inner function without invoking it
}
const increment = outer(); // Store the inner function in a variable
increment(); // This logs "1"
increment(); // This logs "2"
Without closure
function outer() {
let counter = 0;
function inner() {
counter++;
console.log(counter);
}
return inner(); // The inner function is immediately invoked when you return it using return inner();
}
outer(); // This logs "1" and returns undefined
outer(); // This logs "1" and returns undefined
Ill watch it later, i love it already
Can you make a video on javascript design patterns? It would be very helpful .
Great job, thanks a lot for your effort :)
@25:35 ' My name is ${this .name}') is giving outcome = My name is ${this .name}🙄🤔
Hi. You need to use the back ticks (above the tab key). It's called a template literal.
your tutorials are great
please make tutorials on Remix
To undestand closures, just imagine inner function as a normal function in global scope which is outer function. How i get it is like in global scope when you increment something with function it stays to that value and for inner function outer is global scope.
Tell me if i am wrong or right
Thank you for this tutorial.
Best content by best instructor👍👍
Best refresher again Mr Vishwas, thank You sir :)
dude you rock ❤
Can you please prepare something for Java and Git as well
31:19 guy typed "Spermman" as superhero name example. 10/10
it was very helpful thanks a lot now i am waiting for your next crash course on js
Thank you bro, is gonna be more new videos about JS?
Thank you so much sir because if you I m learning js
Thank you so much this is helpful.
thanks your a good explainer.
awesome 💙💙💙
Please make a video on async js and include the applications like where we can apply
Thanks a lot 💐
I have noticed you are given an example of the character of the Breaking Bad web series 😂 though I like your react, Js etc tutorials.
That was a great walkthrough
Great video thanks Vishwas
This was very informative thanks for the info
Very clear 🙏
I'm at the right place to watch this video💪
🔥🔥🔥 THIS IS GOLD. Thank you
at @26:15, implicit binding rule does not work with arrow function.
Amazing as usual
This is pretty much awesome
people with good English can watch video on 2x for time being, stil you can understand very clearly.
A lot of thanks mr.Vishuas
Excellent 💯.
Is there access to the sample code???
Awesome
Please change editor theme... dark default theme is good to watch videos
Great class.
Keep up the good work.
Thank You,
Natasha Samuel
Very helpful
super cool, thx.
Man what the hell im tryna learn about js concepts and boom my man makes a Breaking Bad reference
WOW thankyou so much
Super helpful
Greate content!
I didn't properly understood the prototype inheritance part while the class part was simple as I have been doing java and c++
can you do a crash course on TypeScript?
at 31:13 why we used globalThis instead of const name i did not get it? any help appreciated!
this keyword --> arrow functions should have been mentioned
Thanks
thank you!!!
You're doing god's work. 🔥
Hi bro. Will you upload full javascript tutorials for beginners
hey Sir, thank you for uploading such a great stuff, I do watch your tutorials, you cleared all my concepts, you are a great teacher, alots of love for you from Pakistan
Thank you..!!!
13:00 fn is not a function? typeerror
video on cypress and jest plz
Can you please tell me what is the right order for playlists to learn angular?
I said once and I will say again: "Vishvas for President!"
What's the name of theme that you have used.