I forgot how to do it please help I have tried videos but they dont work i have tried read questions but that also didnt work
Your code so far
let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];
// User Editable Region
let cities = ["London","New York","Mumbai"]
cities ["London","New York","Mexico City"]
console.log(cities)
// User Editable Region
console.log(rows);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 24
let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];
console.log(rows[0]);
rows[2] = 10;
console.log(rows);
Here’s an example from a couple of steps back where the last array element is changed to the number 10. You can always click the back button to return to previous workshop steps to review a concept. The system saves your progress.
That confusion usually comes from thinking you can just rewrite the array inline, but JavaScript doesn’t work like that. You actually need to target the specific index you want to change, otherwise nothing happens. Once you switch to updating the element directly, it all clicks and behaves exactly like expected.