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

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

My favorite channel for Angular. Thanks from Andhra Pradesh

sivatirumani
Автор

This person is teaching with great efforts in a hard way to understand with possible scenarios

swaroopk
Автор

Great content!! Thank you for all the hard work!

akiratoriyama
Автор

It was very clear! Thank you very much Nisha.

nishankarupasinghe
Автор

Your selecting example s are really simple to understand... 👏👏.. started to watch your video s daily before go to bed.

hi-yien
Автор

Excellent explanation madam. thanks for your information.

sivachandra
Автор

I am hoping some more concept in Angular like Interceptor, JWT implementation etc.

sajidahmad
Автор

You made thing's so easy that's why I am forced to like or comment 👍

deepaksinghbhailwal
Автор

Hi Nisha, great videos, could you please do scratch level of javascript videos if possible

Viralshorts_may
Автор

@nisha It it same like deep copy and shallow copy object ? If not then what is the difference ?

shantanujagadale
Автор

Hi Nisha,

Nice explanation. Could you please do a video about view encapsulation

RZ
Автор

Thanks for your videos. In this example you are using spread operators to create a new copy of the original array and object, and then applying changes to them. But that doesn't mean the original array and object are not immutable anymore. One can still make changes to them. I would think this is an example of what happens if an array or object are not copied correctly. Please let me know.

siavashpan
Автор

Nisha could you please post a video about interceptor in angular?

vasanthapandiyanm
Автор

Hi nisha, the intial part where you are showing the slides of mutable and immutable its wrong I believe because array and objects are mutable and strings and numbers immutable...pls check and if possible correct.

ashishnayak
Автор

Hi mam,
If primitive data types are immutable then in below case will it be mutuable?Can you please explain
let x = 20;
let y = x++;
console.log(x)//21
console.log(y)//20

shamli
join shbcf.ru