Which programming language is this?
const ROUTES = ["home", "about", "contact"] as const;
type Route = typeof ROUTES[number];
function go(r: Route) {
location.hash = r;
}
Answer: TypeScript
as const followed by a type alias built from typeof ROUTES[number] is TypeScript-only syntax.