Interface as an Object Type with a TypeScript Array

You can also specify an interface as the type for the entire object.

Let's look at an example. First, let's make an interface for the product:

typescriptinterface Product {
  name: string,
  colors: string[]
};

Then we create an object, specifying its type as the corresponding interface:

typescriptlet prod: Product = {
  name: 'notebook',
  colors: ['red', 'black', 'gray']
}
Задание 1

Make a country object that contains the page title and an array of its cities.