CRAZY JS INTERVIEW 🤯ft. Closures | Namaste 🙏 JavaScript Ep. 12

preview_player
Показать описание
A JavaScript Interview covering in-depth QnA of closures, Data Hiding, Encapsulation, Function Constructors, Garbage Collector, Memory Leaks, Data Privacy with nitty-gritty details along with advantages, and disadvantages of Closure with a lot of code examples.

This is basically the third part of the videos covering the Closures topic in-depth end to end.
The previous 2 videos already released are:
0. Closures in JS - Namaste JavaScript Episode 10
1. Most asked setTimeout + Closures Interview question - Episode 11
2. This video above ☝🏽- Episode 12

These 3 videos will build a strong foundation of the Closures topic in your head, for a LIFETIME.

The only request is to watch this Episode of Namaste JavaScript with the utmost attention. 🙏

Topics Covered:
00:00 - Teaser - The Crazy Interview
00:26 - What is a Closure in JavaScript?
01:34 - Can you give an example of a Closure in JS?
03:29 - Use of double parenthesis ()() in JS
05:25 - Are Let declarations closed over?
06:15 - Are function parameters closed over?
07:45 - Relation of Scope Chain and Closures
10:25 - Conflicting name Global variables in JS
13:25 - Advantages of Closure
14:24 - Data Hiding & Encapsulation in JavaScript?
14:59 - Example of Data Privacy using Closures
21:10 - Function Constructor in JavaScript
25:02 - Disadvantages of Closures?
26:02 - What is a Garbage Collector in JavaScript?
27:25 - Relation between Garbage Collection, Memory Leaks, and Closures?
29:42 - Example of Smart Garbage collection by V8 JS Engine in Chrome
32:00 - Result of the Crazy JS Interview
32:10 - Thank you for watching Namaste JavaScript 🙏

Support this video series, NOT BY MONEY, but by sharing it with your friends. 🙏
I'll give my best to come up with great content and everything absolutely for free on YouTube. 😊

If you are active on Social Media,
please give a shoutout to Namaste JavaScript and help me reach more people. 🙏

Cheers,
Akshay Saini

Would love to Stay Connected with you ❤️

#NamasteJS #AkshaySaini
Рекомендации по теме
Комментарии
Автор

Timestamps for this video:
00:26 - What is a Closure in JavaScript?
01:34 - Can you give an example of a Closure in JS?
03:29 - Use of double parenthesis ()() in JS
05:25 - Are Let declarations closed over?
06:15 - Are function parameters closed over?
07:45 - Relation of Scope Chain and Closures
10:25 - Conflicting name Global variables in JS
13:25 - Advantages of Closure
14:24 - Data Hiding & Encapsulation in JavaScript?
14:59 - Example of Data Privacy using Closures
21:10 - Function Constructor in JavaScript
25:02 - Disadvantages of Closures?
26:02 - What is a Garbage Collector in JavaScript?
27:25 - Relation between Garbage Collection, Memory Leaks, and Closures?
29:42 - Example of Smart Garbage collection by V8 JS Engine in Chrome
32:00 - Result of the Crazy JS Interview
32:10 - Thank you for watching Namaste JavaScript 🙏

How confident are you with Closures after watching this video. Please tell me in the comments, I read each comment. ❤️

akshaymarch
Автор

What an interview, not just split screen, split personalities 🔥🙇‍

bitsbyab
Автор

Took me a while to realise it's you on both sides.
I was hunting description to see who the other guy is 😂😂

GareebScientist
Автор

This should've taken so long to make..
- First he needs to write a script
- Calculate the time he needs to say each dialogue for proper co-ordination
- Dress up as 2 different people and shoot the video
- Properly edit the video to make sure it doesn't feel like the same person
- Upon that there will be a lot of bloopers we didn't see

It probably took him whole day. Fantastic job Akshay 👏

shashikanthp
Автор

Things learned:
1. An inner function can be directly called using two parenthesis ()().
2. Even parameters can be passed this way (Remember that the function needs to be returned to do this)
3. Closures can also be used for data hiding and encapsulation. So other code cannot access this value.
4. Unused variables are automatically deleted in High Level Programming language by garbage collector. Closures allocate a lot of memory which cannot be deleted so this acts as a disadvantage.
5. Some browsers now have smart garbage collectors that automatically deletes variables that are not used outside closures.

jagrutsharma
Автор

Let us take a moment to appreciate the amount of time and efforts put to create this masterpiece. #respect

manjunathbabu
Автор

I never thought that someone will make learning so entertaining😂 hats off to you bro🙏 you are saviour for web developers 👍

nivikasvlogs
Автор

Bro this is absolute gold how did you pretend to be nervous interviewing yourself hahahahahhaha.... Acting, Video, The Mole, everything gets an A plus. Subscribed

robertbarrowfarrisiii
Автор

After 6 years of experience, I have realized how deep and beautiful the closure is. At this level, I haven't even think of it. Really great work. Expecting more. You are a JS hero.🙂

RahulGupta-kmnm
Автор

you hit the ball out of the park with this video, this is not just a mock interview but a postmortem of closures, got so much insight along with entertainment, thank you so much, keep enlightening and entertaining us

lakshmangottapu
Автор

From a creator perspective how hard it must have been....like presenting all the stuffs in a organized manner and attention to was literally on you for your efforts Sir.

sameersahu
Автор

The interviewer Looks like Villain in old movies, but in Reality he is a Super Man and Sakthi Man. You are and You made my day brother . More power to you Brother.

haribabupoturaju
Автор

This namastey javascript series is going to make many folks get a good job

prashanttanwar
Автор

You know the best part was that while you were portraying the candidate side you have same level of confidence +nervousness which we all face and hile you were portrayong the interviewer part you were as confident as interviewers normally are.👏👏

PriyankaKumari-qsht
Автор

What caught my eye was the passion that you put into it. You can see that you REALLY want your viewers to learn and not just spill your knowledge out.

talwinter
Автор

Watching this excellent series after 1.5 years from the time it was uploaded.

Let me tell you I have never felt the super powers of Javascript before this, Hatts off 🔥

saurabhandhare
Автор

That little nervousness in the interviewee voice and the strict and confident tone of the interviewer explains that he is a great actor as well 😆

theaveragecoder
Автор

Wow! This is a HIGHER ORDER tuto! Thank you so very much for it! This scenario really allows to understand all of the previous videos of the series in action. PLUS, you give more examples to better understand. PLUS you begin to explain the relevance of closures to get behaviours seeked when using classes, private variables and methods to access those hidden attributes... PLUS you kind of show how all of this is related to the functional programming paradigm with the impossibility to access the inner workings of the function while interacting with it only through functions... I would love so much if you did videos on functional programming and its uses in the industry! This 12th episode leaves me in awe... Again, THANK YOU for this content!

laurentgauthier
Автор

Wow !!..what an awesome video and content...This is probably best video on closures on internet and Akshay is a good actor too ! His JS series is world class !

kiranjitkaur
Автор

I'd pay to watch you kill a Web3 series! You're ability to sustain engagement, especially for someone with clinically diagnosed ADHD - phenomenal! As in you've helped actually begin to understand code, & be able to read it like a book.

chromashift