Understanding Immutability in JavaScript

  Рет қаралды 6,257

Deborah Kurata

Deborah Kurata

Күн бұрын

Пікірлер: 44
@jawwadalam
@jawwadalam Жыл бұрын
Detailed simple explanation of why immutability is important. Thank you 👍
@deborah_kurata
@deborah_kurata Жыл бұрын
So nice of you to say. Thank you for watching!
@ashutoshtiwari5222
@ashutoshtiwari5222 Жыл бұрын
Simple yet informative.
@deborah_kurata
@deborah_kurata Жыл бұрын
Glad it was useful!
@AesSedai2020
@AesSedai2020 3 ай бұрын
Nice, this was a really good explanation why immutability is important, thank you :)
@deborah_kurata
@deborah_kurata 3 ай бұрын
Thank you! Glad it was helpful!
@RsPippen
@RsPippen Жыл бұрын
perfect timing! i was just dealing with a bug related to this topic
@deborah_kurata
@deborah_kurata Жыл бұрын
Great! Glad to hear it was useful!
@codingSparrow143
@codingSparrow143 8 ай бұрын
Thank you so much!! Very clear explanation❤❤
@deborah_kurata
@deborah_kurata 8 ай бұрын
Thank you. Glad it was helpful!
@Sinan997
@Sinan997 Жыл бұрын
Great video again, now i know why immutability is important. Thank you!
@deborah_kurata
@deborah_kurata Жыл бұрын
Glad it was helpful! Thanks!
@abdulrenishr
@abdulrenishr 6 ай бұрын
Awesome explanation
@deborah_kurata
@deborah_kurata 6 ай бұрын
Thank you!
@karlee8608
@karlee8608 Жыл бұрын
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.
@deborah_kurata
@deborah_kurata Жыл бұрын
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.
@elyoaprogrammer
@elyoaprogrammer Жыл бұрын
So important topic explained by @DeborahKurata!!!
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you!
@ngotienthien7939
@ngotienthien7939 Жыл бұрын
thank a lot, That's so useful
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you!
@ibmmsayskhiedr4220
@ibmmsayskhiedr4220 Жыл бұрын
Thanks a million I think immutability now became a piece of cake Thanks @Deborah
@deborah_kurata
@deborah_kurata Жыл бұрын
Great! Thank you!
@farzadbahadorifar1126
@farzadbahadorifar1126 11 ай бұрын
you explain really well, thank for that.
@deborah_kurata
@deborah_kurata 10 ай бұрын
Thanks for watching!
@FuyadFuyad-ns6qg
@FuyadFuyad-ns6qg 7 ай бұрын
very informative and well descriptive tutorial video. Hope you will give us more and more informative and well descriptive tutorials .❤
@deborah_kurata
@deborah_kurata 7 ай бұрын
Thank you! 😊
@MANAHILEJAZ-s7z
@MANAHILEJAZ-s7z 15 күн бұрын
Thanks for your help, there's is a same concept of mutability and immutability in python also
@deborah_kurata
@deborah_kurata 10 күн бұрын
Yep! Immutability is a powerful concept across many languages! 😊
@respostasimples
@respostasimples Жыл бұрын
doing god's work Kurata, thanks!
@deborah_kurata
@deborah_kurata Жыл бұрын
😊 Thank you for watching!
@GreenClearScenery
@GreenClearScenery 13 күн бұрын
Hi Deborah, in the video you give an example of primitives being immutable. So the code total = 42; // (1) total += 10; // (2) means that in (1), total is pointing at a memory with value 42. Then, in (2), total is pointing at a different memory address with value 52. But how can we re-access the value 42 ?? (We don't know the memory address for this anymore ?)
@rs4267
@rs4267 Жыл бұрын
As usual great job ❤
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you so much!
@JJOhns-fy4tl
@JJOhns-fy4tl 10 ай бұрын
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?
@NawalFatima-e8m
@NawalFatima-e8m 3 ай бұрын
slice performs a shallow copy of the array and it can be modified in future, so i think it should come under the mutable column
@hodasalah1663
@hodasalah1663 Жыл бұрын
you are the best Thanks a lot
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you for watching!
@povdata
@povdata 2 ай бұрын
How to get value of p variable by prev address x?
@SolidWorksMastery-hr4sg
@SolidWorksMastery-hr4sg 5 ай бұрын
one question : i've read that dynamic arrays (which we use in javascript) create a new array in memory in case of adding new value which would exceed the length of the array , so does that mean that sometimes the address of the array change ?
@deborah_kurata
@deborah_kurata 5 ай бұрын
This answer may be useful: stackoverflow.com/a/20323491
@MarcoPinheiro
@MarcoPinheiro Жыл бұрын
Bravo!!
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you!
@abnow1998
@abnow1998 Жыл бұрын
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..
@deborah_kurata
@deborah_kurata Жыл бұрын
Thank you for the suggestion!
Build Generalized DRY Angular Code with Generics
14:44
Deborah Kurata
Рет қаралды 12 М.
Error Handling with Observables
10:19
Deborah Kurata
Рет қаралды 7 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
JavaScript Array sort() vs toSorted() (new in ES 2023)
7:28
Deborah Kurata
Рет қаралды 2,3 М.
RxJS in Angular: Terms, Tips, and Patterns
43:01
Deborah Kurata
Рет қаралды 34 М.
The Importance of Immutability in React
6:26
Hello Code World
Рет қаралды 126
How Angular Signals and RxJS Work Together
16:15
Deborah Kurata
Рет қаралды 31 М.
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
Use takeUntilDestroyed to Unsubscribe from Angular's Observables
10:36
When Should We (NOT) Use a Signal effect()?
9:33
Deborah Kurata
Рет қаралды 4,6 М.
Currying for More Generalized Angular Code
12:41
Deborah Kurata
Рет қаралды 6 М.
JavaScript Visualized - Promise Execution
8:42
Lydia Hallie
Рет қаралды 199 М.
Angular's New @for Block Features
7:30
Deborah Kurata
Рет қаралды 4,4 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН