Question #168

Author: admin
tags: TypeScript  
const arr = [
  'London',
  'Berlin',
] as const;

type Location = typeof arr[number]; 
What is the type of Location?
type Location = string;
type Location = number;
type Location = Array<number|string>;
type Location = Array<number>;
type Location = Array<'London' | 'Berlin'>;
type Location = 'London' | 'Berlin';
After as const use the arr array got the readonly ["London", "Berlin"] type.
Rate the difficulty of the question:
easyhard