Hello, I tried to assign values like in the example, but am getting an error.
Your code so far
const s = [5, 7, 2];
function editInPlace() {
"use strict";
// change code below this line
// s = [2, 5, 7]; <- this is invalid
s[0] =2;
s[1]=5;
2[2]=7;
// change code above this line
}
editInPlace();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.
Yes, in this specific example of s being [5, 7, 2]. If the instructions would have said change [5, 7, 10, 3] to [10, 3, 7, 5], s.sort() would be useless.