curriculum/challenges/english/blocks/learn-introductory-javascript-by-building-a-pyramid-generator/665732da4815b70bb083915e.md
In the last few steps, you learned all about working with arrays. Take a moment to review what you have learned.
Start by declaring a cities variable and initializing it as an array of the strings "London", "New York", and "Mumbai". Then log that variable to the console.
After logging, change the last element of cities to the string "Mexico City", then log the cities variable again.
When done correctly, you should see this output in the console.
[ "London", "New York", "Mumbai" ]
[ "London", "New York", "Mexico City" ]
You should use let to declare a cities variable.
assert.match(code, /let\s+cities/);
You should assign an array of the strings "London", "New York", and "Mumbai" to the cities variable.
assert.match(code, /let\s+cities\s*=\s*\[\s*("|'|`)London\1\s*,\s*("|'|`)New York\2\s*,\s*("|'|`)Mumbai\3\s*,?\s*\]/);
You should use console.log() to log the entire cities array to the console.
assert.match(code, /console\.log\(\s*cities\s*\)/);
You should update the last element of the cities array to the string "Mexico City". Remember that you can access the last element of an array using array[array.length - 1].
assert.deepEqual(cities, ["London", "New York", "Mexico City"]);
You should have two console.log(cities) statements in your code.
assert.lengthOf(__helpers.removeJSComments(code).match(/console\.log\(\s*cities\s*\)/g), 2);
let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];
--fcc-editable-region--
--fcc-editable-region--
console.log(rows);