Learn Introductory JavaScript by Building a Pyramid Generator - Step 24

Tell us what’s happening:

I have a problem in step 24, I solved the algorithm correctly, I checked it but the platform gives me an error in the code.

let cities [“London”, “New York”, “Mumbai”];
console.log(cities);
cities[cities.length - 1] = “Mexico City”;
console.log(cities);

Your code so far


// User Editable Region

let cities ["London", "New York", "Mumbai"];
console.log(cities);
cities[cities.length - 1] = "Mexico City";
console.log(cities);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 24

Welcome to the forum @JesusOlarte

The red squiggly lines indicate a syntax error.

s

The hint message is giving you a clue what the code is missing.

Happy coding