Test not passing

Tell us what’s happening:
I don’t know where my code is wrong.
Your code so far


const s = [5, 7, 2];
function editInPlace() {
 // Only change code below this line
s = [2, 5, 7] // Using s = [2, 5, 7] would be invalid
s[0] = 2;
s[1] = 5;
s[2] = 7;
 // Only change code above this line
}
editInPlace();
   **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 5.1.1; SM-J200G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.110 Mobile Safari/537.36.

Challenge: Mutate an Array Declared with const

Link to the challenge:

this is causing an error and stopping the code from executing

you can’t use invalid syntax if you want your code to run

Yeah it worked. Thanks for your efforts.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.