javascript - Does Object.freeze() cause the assigned object to be immutable? -


if write following code:

var foo = [1, 2, 3, 4]; var bar = foo; object.freeze(bar); 

does mean foo immutable?

if not, how can bar remain constant if foo updated?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -