JavaScript Under The Hood [4] - Memory Storage

  Рет қаралды 41,108

Traversy Media

Traversy Media

Күн бұрын

In this video, we'll look at how and where primitive values and reference data (objects) are stored.
💻 My Courses & More
traversymedia.com
💖 Show Support
Patreon: / traversymedia
PayPal: paypal.me/traversymedia
👇 Follow Me On Social Media:
Twitter: / traversymedia
Instagram: / traversymedia
Linkedin: / bradtraversy
Timestamps:
0:00 - Intro
0:59 - Memory Management & Garbage Collection
2:34 - Primitive vs Reference Types
4:19 - Stack vs Heap (Diagram)
6:47 - Stack vs Heap (Code)
9:41 - Devtools Memory Tab

Пікірлер: 59
@umamaheshmeka1032
@umamaheshmeka1032 Жыл бұрын
The Voice - which motivates developers to go to any extent to learn !!! I really love your teaching 💝💝💝
@ngolelawsonmbwoge3647
@ngolelawsonmbwoge3647 Жыл бұрын
I think this is the first time I truly understood, when they say objects are passed by reference, from the diagrams you showed. And visualizing the heap memory storing objects, functions and arrays and stacks storing primitive data types, is just gold! It makes it way clearer to understand! Thank you so much, sir Brad!
@vinaypatil8009
@vinaypatil8009 Жыл бұрын
That heap memory explanation with diagram is on point perfect. Thanks for your hard work sir.
@kosmarjus
@kosmarjus Жыл бұрын
Ohhh man this took me so long to figure out. I was so mad why my initial object changed every time I recalculated some values. Thank you for shedding some light on the subject.
@PRAHLADSAHU-pk4fd
@PRAHLADSAHU-pk4fd Жыл бұрын
I like the way he admitted he doesn't know about memories much and still gave the relevant info with great explanation.
@devbrothonath9396
@devbrothonath9396 Ай бұрын
2nd time hearing about stack and heap and it's set in my mind. This was so simple, it blew me away.
@darkmojojojo
@darkmojojojo Жыл бұрын
Keep going with these videos. It's definitely helping with understanding why JS behaves the way it does for me.
@jhmesseroux
@jhmesseroux Жыл бұрын
more videos like this , love it Brad , i learned something new
@godfreyndiritu9062
@godfreyndiritu9062 Жыл бұрын
Imagine all that knowledge in 12 minutes, how much more helpful if it was an hour or so? Thanks Brad
@darkmojojojo
@darkmojojojo Жыл бұрын
Personally I like these bite-sized videos. They help me with understanding basic concepts without having too much information thrown at me at the same time.
@Retrofire-47
@Retrofire-47 9 ай бұрын
@@darkmojojojo pots and pans, stranger.
@lathamanoharan642
@lathamanoharan642 Жыл бұрын
Thanks for this series Brad. It was very helpful for me to understand some of the basics of why javascript works this way
@pablojoyce
@pablojoyce Жыл бұрын
This is a great series! Thanks. You mentioned revamping the modern JavaScript from the beginning course. I’d love to know when that is going to happen, Brad. I love your teaching style and almost signed up last week but was put off by the age. Considered other more recent courses but would definitely take yours if updated.
@alexiscostoulas
@alexiscostoulas Жыл бұрын
maybe the best and most clear explanation on this topic !!
@elyoaprogrammer
@elyoaprogrammer Жыл бұрын
Execellent series..I enjoyed it!..Thanks Brad !
@bevedel
@bevedel Жыл бұрын
Waiting for more videos from you. Thank you for this great serie.
@genrum4803
@genrum4803 Жыл бұрын
Love this series, very helpful for beginners.
@WendimuSitotaw
@WendimuSitotaw Жыл бұрын
I'm really digging this series!
@josephwong2832
@josephwong2832 Жыл бұрын
Wow! Finally I understand it now. Thanks Brad
@thisweblabvideos
@thisweblabvideos Жыл бұрын
Amazing video. Well explained and important. Thanks
@gunarcom
@gunarcom Жыл бұрын
This is a strong video. Good work my friend!
@eillioniscreating
@eillioniscreating 9 ай бұрын
Please make more video ! I love your videos.
@xkwantified
@xkwantified Жыл бұрын
Excellent series👍!
@yoshreimi
@yoshreimi Жыл бұрын
wow thank you so much for creating this content for free
@moqusi24
@moqusi24 Жыл бұрын
Thank you for the explanation
@sourandbitter3062
@sourandbitter3062 Жыл бұрын
Love the new intro
@drippindamnfaucet3309
@drippindamnfaucet3309 Жыл бұрын
Nice Xplanation!!!!
@ahmad-murery
@ahmad-murery Жыл бұрын
7:34 I whish 40 but we'll say 44 😥 so, enjoy it while you're there, Thanks Brad,
@bossmohd
@bossmohd 8 ай бұрын
Great video, although I came in looking for something else but this was informative. What I was looking for is recommendations for memory management. For example, is it bad to declare variables or should we try to minimize it. For example should I do const result = someFunction() and then return result, or return someFunction(). Is this more efficient? What are the tools that can help us measure performancece in node? Are async/await consuming more memory than sync functions?
@rutvijdoshi9664
@rutvijdoshi9664 Жыл бұрын
Great video. Please create video series on React under the hood.
@mulualemtekle6094
@mulualemtekle6094 Жыл бұрын
great content dude!!
@jonp9511
@jonp9511 Жыл бұрын
Very helpful
@G.Lomidze
@G.Lomidze 11 ай бұрын
Thank you for series. Please one question. On 8.17 min which extension create a line on the variable which is not use now? Which extension is this
@mirkafarkasova2425
@mirkafarkasova2425 27 күн бұрын
Great video! Had no idea it works like this. In what case would I use this tho?
@legalcoffee5315
@legalcoffee5315 Жыл бұрын
So helpful 🎉thanks!
@dasuntheekshana3433
@dasuntheekshana3433 5 ай бұрын
nice work thank y0u
@nikhilmandaliya
@nikhilmandaliya 3 ай бұрын
Thank you for this series, your explanation makes advance concepts easy to understand. But I have one question, if primitive variables are stored in stack, is this same as call stack? If yes, then that variables should be removed when function completes execution. So how a function can access that variable in terms of closures?
@nithinraj342
@nithinraj342 Жыл бұрын
U r a good teacher. Can u do video on how nestjs project architecture need to be.
@ScriptRaccoon
@ScriptRaccoon Жыл бұрын
Shoutout to Github Copilot who always knew what Brad wanted to type next :-O
@matchujk
@matchujk 4 ай бұрын
in the first example from 4:35 to 6:47 is the 'stack' the global execution context?
@mahdikamran8061
@mahdikamran8061 5 ай бұрын
Thank you.
@MgelikaXevi
@MgelikaXevi 7 ай бұрын
for algo, great series!
@DanzzyTechWorld
@DanzzyTechWorld Жыл бұрын
This explains mutability well
@nicogarcia7302
@nicogarcia7302 Жыл бұрын
Great video Brad!! I have a doubt tough, when you you reassign newName, shouldn't it still be in memory and the engine allocates memory for a new string?
@developersharif
@developersharif Жыл бұрын
Love from Bangladesh ♥
@thewild123
@thewild123 Жыл бұрын
Hey Brad, thanks for the tutorial. I wonder if these diagrams help professional developers visualize how memory is occupied in their apps? I don’t really consider myself a professional but I did study memory management and memory allocation strategies by operating systems. I think it’d be better for myself and more advanced developers to study how JavaScript engine allocates memory on a much more lower level.
@deathangel908
@deathangel908 9 ай бұрын
Is stack can't handle variables of variable size, how comes when you change a string variable it still resides on the same spot in the stack?
@eboum4273
@eboum4273 7 ай бұрын
Thanks
@anandstephan6020
@anandstephan6020 Жыл бұрын
please make more video of javascript core concept
@tamboleo
@tamboleo Жыл бұрын
Newby question here, how is he having the values directly on the console without refreshing the code every time? I saw this behavior on Angular but didn't know you could get real time updates on JS as well, is he using an extension or something ?
@k.ksharma4457
@k.ksharma4457 Жыл бұрын
awesome👍👏
@prudhvichinnam1488
@prudhvichinnam1488 Жыл бұрын
Do series on react under the hood
@georgenonis5967
@georgenonis5967 Жыл бұрын
Not sure why but I cant find objects in the snapshot. Great video anyways and great explanation as always
@buddhaburrito
@buddhaburrito Жыл бұрын
11:10 I wonder how he auto complete those lines? Did he store it somewhere? What vscode extension was it?
@ScriptRaccoon
@ScriptRaccoon Жыл бұрын
It's Github Copilot.
@buddhaburrito
@buddhaburrito Жыл бұрын
@@ScriptRaccoon Thank you!
@Red_Coder
@Red_Coder 11 ай бұрын
Is there course Js under hood
@sujaigorai7752
@sujaigorai7752 Жыл бұрын
Everything in javascript is stored in heap memory
@mecreature
@mecreature Жыл бұрын
😍😍😍😍😍
JavaScript Under The Hood [5] - JavaScript Engine Overview
12:30
Traversy Media
Рет қаралды 37 М.
JavaScript Under The Hood [1] - Thread & Call Stack
9:05
Traversy Media
Рет қаралды 113 М.
КТО испугается больше всех?
00:30
Аришнев
Рет қаралды 7 МЛН
Dogs and people become brothers~ #funny pets #funny dog #funnyvideo #shorts
00:10
Stack vs Heap Memory - Simple Explanation
5:28
Alex Hyett
Рет қаралды 157 М.
HTMX: 3 IRL Use Cases
18:33
ThePrimeTime
Рет қаралды 93 М.
Reference Vs Value In JavaScript
15:12
Web Dev Simplified
Рет қаралды 174 М.
Blazingly Fast JavaScript with ThePrimeagen | Preview
18:22
Frontend Masters
Рет қаралды 98 М.
I Love Neovim But I WONT Use It | Prime Reacts
23:22
ThePrimeTime
Рет қаралды 97 М.
garbage.collect() / Андрей Роенко (Яндекс)
48:07
Frontend Channel
Рет қаралды 7 М.
Go vs Rust vs Bun vs Node | Prime Reacts
18:07
ThePrimeTime
Рет қаралды 150 М.
Garbage Collection (Mark & Sweep) - Computerphile
16:22
Computerphile
Рет қаралды 225 М.
Small Phones are Dead and We Killed Them
8:42
Marques Brownlee
Рет қаралды 2,9 МЛН
iphone 14 Vs Samsung Galaxy Vs Iphone 50 💔
0:18
Onevilage
Рет қаралды 10 МЛН
ЛЕРА СОШЛА С УМА? 😳
1:00
HOOOTDOGS
Рет қаралды 1,1 МЛН
Возможно ли удалить интернет? 🌐
0:35
ЗАРАЗ
Рет қаралды 1,6 МЛН