001
002let cities = ['Athens' , 'Paris', 'London'];
003
004console.log(cities[1]);
005
006
007
008cities[cities.length] = 'New York';
009
010console.log("Length after New York is added:");
011console.log(cities.length);
012cities[cities.length] = 'Tokyo';
013console.log("Length after Tokyo is added:");
014console.log(cities.length);
015
016console.log(cities);
017for(let i = 0; i < cities.length; i++)
018{
019 console.log(cities[i]);
020}
021
022for (let i = 0; i < cities.length; i++)
023
024{
025
026console.log("City " + (i+1) + ': ' + cities[i]);
027
028}