How functions work in JS ❤️ & Variable Environment | Namaste JavaScript Ep. 4

preview_player
Показать описание
Understand how Functions work behind the scenes in JavaScript.What happens when a function is executed/invoked inside the JS Engine. This video covers an in-depth analysis of function execution and its variable environments.

Whenever a function is invoked in JavaScript a functional Execution Context is created and memory is allocated. Once the memory is allocated to the variables and functions, then the code is executed synchronously, one line at a time. Let's check all that with examples in the video :

Topics covered:
00:00 - Introduction - Function Invocation and Variable Environment in JS
02:43 - Deep Dive Explanation of the code of function Invocation
04:16 - How the Call stack works behind the scenes in JS
14:57 - Demo of Variable Environment and Call Stack in Browser
20:39 - Summary of JS fundamentals covered
21:08 - Teaser of next video - Shortest JavaScript Program
21:16 - 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
Рекомендации по теме
Комментарии
Автор

How was the video? Are you feeling excited? Please comment below. ❤️

akshaymarch
Автор

If you teach anyone can learn coding. You’re a gem to the community. Please teach reactjs next. Please! 🙏🏻💯

sourabhmahato
Автор

After 5 years working with Javascript, im understanding the basics with the help fo you !

JustinPhilip
Автор

This guy is crazy about JS and a gem to the teaching fraternity .Explaining all the minute details with such high energy and enthusiasm.The hand gestures, the smile of satisfaction just proves his intentions of helping . #SharingisCaring

shardulbhot
Автор

Thanks Akshay
I am a Namaste Dev Subscriber as well, loving all the videos.

jatinnandwani
Автор

Summary:

1. We learnt how functions work in JS.
2. At first a global execution context is created, which consists of Memory and code and has 2 phases: Memory allocation phase and code execution phase.
3. In the first phase, the variables are assigned "undefined" while functions have their own code.
4. Whenever there is a function declaration in the code, a separate local execution context gets created having its own phases and is pushed into the call stack.
5. Once the function ends, the EC is removed from the call stack.
6. When the program ends, even the global EC is pulled out of the call stack.

avikkundu
Автор

I am going to be honest with you. You are literally so good at this. I get excited to watch your content after full time work. Please keep going.

frank
Автор

I teach high school students JavaScript programming and I love these videos. They are fantastic and really help my students understand how JS works so they can create quality code and increases their troubleshooting skills. Thank you!!

colleenmoran
Автор

Brother....never stop creating such am trying to learn JavaScript though some paid courses but they literally confused me and then I came across your videos I have to tell, you are a life saver, Please create more such videos or even a Js course. Will share this as much as I can

nikhilraj
Автор

I've been fumbling around with learning Javascript for the last year, video after video of watching people build projects, and not learning a thing. You're videos are the first I have found that teach me all the things about JS that I have been wanting to learn, and missing with all the other peoples videos. Thank you so much for making me love learning this language again. I had nearly lost hope.

MasonGamingFamily
Автор

After school, this is the kind of teaching I was missing! Awesome presentation and explanation Akshay! The phobia of JS is reducing further after completing each video.

himaniagarwal
Автор

You don't have to say keep watching it for 2more minutes or please bear with me. Viewers are totally glued to your series. It is that amazing. Thanks so much for these insights.

renugupta
Автор

Eagerly waiting to understand the ""THIS"" concept

balajibalasubramaniam
Автор

7:30 in the morning and i have never been so excited to study something so complicated. Hands down, best explanation ever. Thank you so much Akshay. Appreciate your hard work.

siddharthgaglani
Автор

I can write reasonably good JS code (I spend a lot of time with serverside stuff) but I have to admit, I never understood what was going on behind the scenes. Suddenly, tiny little bugs I used to experience are starting to make more sense. This playlist is extraordinary! I’m binging the entire thing! I’m so glad I can finally explain the local and global execution contexts! Onward 😁🎊💯❤️🙌🏽✨

ozzyfromspace
Автор

Awesome man, I am stuck to my chair to complete this playlist🔥

randeeprana
Автор

We need teachers like you, who are passionate about teaching and make things understand easily

veekshagokul
Автор

I have never come across such high-quality content on JS. Thanks for digging so deep.

deepjyotkaurbindra
Автор

A good thing in your video is ....you never waste the time of your viewers ..hats of to you sir, superb explanation

guruprasadsali
Автор

You're the first youtuber in coding to whom i recommended to all of my co-worker and friends. Kudos to you bro.

sarthak