// modern JavaScript
const variable = [5];

console.log('const array', variable); // [5]

variable[0] = variable[0]*2;

console.log('changed const array', variable); // [10]
View Compiled
Rerun