filmov
tv
ES6 Tutorial #5: Mutable and Immutable Objects| Interview Question | Modern Javascript 2021

Показать описание
Mutable and Immutable is one of the most important concept in javascript .
Mutable means which can change its value and
Immutable means which value can't be change once it is created. In javascript there are 2 ways the data stored . Either primitive or reference Type.
Primitive type means string, number, boolean, symbol, null, undefined these are stored at specific location in memory. So whenever you give any value to any of the primitive type, it always store its value at that location but on another hand reference type never store the value instead it store the address of that variable.
Array and objects are reference types
So Primitive types are immutable and reference types are mutable. So once you understand that in your code the value is mutable and immutable , you can save yourself from so many issues and errors.
So in this video I have explained difference between mutable and immutable and how you can convert your mutable type to immutable using ES6 Spread operator.
I hope you have liked this video. For such more video like and subscribe my
channel
Watch Complete playlist on Javascript:
Watch my Angular playlist :
Follow me:
For more such interesting videos, please subscribe to my channel and stay connected.
#mutableAndImmutable #ModernJavaScript #NishaSingla
Mutable means which can change its value and
Immutable means which value can't be change once it is created. In javascript there are 2 ways the data stored . Either primitive or reference Type.
Primitive type means string, number, boolean, symbol, null, undefined these are stored at specific location in memory. So whenever you give any value to any of the primitive type, it always store its value at that location but on another hand reference type never store the value instead it store the address of that variable.
Array and objects are reference types
So Primitive types are immutable and reference types are mutable. So once you understand that in your code the value is mutable and immutable , you can save yourself from so many issues and errors.
So in this video I have explained difference between mutable and immutable and how you can convert your mutable type to immutable using ES6 Spread operator.
I hope you have liked this video. For such more video like and subscribe my
channel
Watch Complete playlist on Javascript:
Watch my Angular playlist :
Follow me:
For more such interesting videos, please subscribe to my channel and stay connected.
#mutableAndImmutable #ModernJavaScript #NishaSingla
Комментарии