Array declared with let and const keyword - 01

Array declared with let keyword:

The variable declared with the keyword let can be reassigned but the variable declared with the keyword const cannot be reassigned.

Similarly, the array declared with the keyword let can be reassigned and can be changed or updated array elements.

Array declared with const keyword:

But when we declare the array with a const keyword, then we cannot reassign the array. We can only change or update the content( or array element).






Post a Comment

Previous Post Next Post