scrimba
Learn Modern JavaScript
Mutate an Array Declared with const
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Mutate an Array Declared with const
AboutCommentsNotes
Mutate an Array Declared with const
Expand for more info
index.js
run
preview
console
const s = [5, 7, 2];
function editInPlace() {
"use strict";

s = [2, 5, 7];

}
editInPlace();
Console
Error: SyntaxError: unknown: "s" is read-only (/index.js:1)
,
index.html
-1:07