// The Code is as follows:

const cities = ['Orlando', 'Dubai', 'Edinburgh', 'Chennai', 'Accra', 'Denver', 'Eskisehir', 'Medellin', 'Yokohama'];

const nums = [1, 50, 75, 200, 350, 525, 1000];

//  A method that will return undefined
cities.forEach(city => console.log('Have you visited ' + city + '?'));

// A method that will return a new array
const longCities = cities.filter(city => city.length > 7);

// A method that will return a single value
const word = cities.reduce((acc, currVal) => {
  return acc + currVal[0]
}, "C");

console.log(word)

// A method that will return a new array
const smallerNums = nums.map(num => num - 5);

// A method that will return a boolean value
nums.every(num => num < 0);
const fixedArray = ['I', 'Am', 'A', 'Fixed', 'Array'];

const mathArray = [1, 2, 11, 14, 16];

console.log(mathArray.map(number => {
  return number * 2 
}));

console.log(fixedArray.filter(word => {
  return word.length > 1;
}));

console.log(mathArray.reduce(num => {
  return num * 1;
}));

Practice for the different methods to deal with an array.