JavaScript Getting Started With ES2015 Defining Variables With let and const Using Constants with Arrays and Objects

when I tried to change the constant value for an array .it is changing .how did that happen?

when I tried to change the constant value for an array .it is changing .how did that happen?

1 Answer

Steven Parker
Steven Parker
177,538 Points

You probably mean you can change the contents of a constant array, which is allowed. What you cannot do is reassign the array variable itself with something else.