Understanding Immutability in JavaScript
Вставка
- Опубліковано 25 чер 2024
- We often hear the terms: immutable and immutability. What do they mean and, as developers, why should we care?
In this video, we look at immutability of primitives, arrays, and objects with JavaScript examples. And we enumerate why immutability is important for programming.
Links
JavaScript Code: stackblitz.com/edit/immutabil...
Content
00:00 Understanding Immutability in JavaScript
00:43 Primitives in JavaScript: Naturally Immutable
02:10 JavaScript Array are Mutable
03:55 Embracing Immutability with Arrays
05:52 Mutable Nature of JavaScript Objects
07:28 Immutability with Objects
08:15 Why Is Immutability Important?
09:00 Wrap up
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and UA-cam content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
Contact me on Twitter (X): / deborahkurata
Find my Pluralsight courses: www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: www.freecodecamp.org/news/aut...
View my UA-cam content: / @deborah_kurata
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#javascript #immutability #mutability #immutabilityinJavaScript - Наука та технологія
Bravo!!
Thank you!
Awesome explanation
Thank you!
very informative and well descriptive tutorial video. Hope you will give us more and more informative and well descriptive tutorials .❤
Thank you! 😊
Thank you so much!! Very clear explanation❤❤
Thank you. Glad it was helpful!
Detailed simple explanation of why immutability is important. Thank you 👍
So nice of you to say. Thank you for watching!
Simple yet informative.
Glad it was useful!
you explain really well, thank for that.
Thanks for watching!
So important topic explained by @DeborahKurata!!!
Thank you!
perfect timing! i was just dealing with a bug related to this topic
Great! Glad to hear it was useful!
Great video again, now i know why immutability is important. Thank you!
Glad it was helpful! Thanks!
thank a lot, That's so useful
Thank you!
you are the best Thanks a lot
Thank you for watching!
As usual great job ❤
Thank you so much!
so glad i found your channel. thank you for your clear explanations. one question though: when creating a new object by using the spread operator and the original object contains an array, i would copy the reference of the array, wouldn't I? So maybe I should figure out a combination of using the spread operator to treat the object as immutable and the with() method for the array. Or am i on the total wrong track?
The video is very informative. You should include a visual evidence of the primitive data type being immutable. Same thing with object and array. I like how you make the connection to the memory instead of the value itself. It helps explain what is going on behind the hood in JavaScript. If you can show an updated video with actual example that would be grateful.
Thank you!
In the description of the video, I have a link to some code that demonstrates immutability. It defines a variable of each data type (primitive, array, object) as a property of another object. It then demonstrates when the setter is called (code sees the value as changed) and when it isn't. Please see the video description for the link.
doing god's work Kurata, thanks!
😊 Thank you for watching!
Thanks a million I think immutability now became a piece of cake Thanks @Deborah
Great! Thank you!
Hi Deborah, been following you since 2020, have watched all of your Angular courses on Plural sight, my request and I believe this is currently the hot topic: Next.js, pls make a series on this..
Thank you for the suggestion!