Which programming language is this?
type Method = "get" | "post";
type Handler = `on${Capitalize<Method>}`;
const button = document.querySelector("#save")!;
const name: Handler = "onGet";
button.textContent = name;
Answer: TypeScript
A template literal type built with
Play Programming Languages ▸
Capitalize<Method> and the postfix non-null ! after querySelector(...) are TypeScript, not valid JavaScript.