$ ./guess_the_languageProgramming Languages
Programming Languages · hard · #607

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 Capitalize<Method> and the postfix non-null ! after querySelector(...) are TypeScript, not valid JavaScript.
Play Programming Languages ▸