$ ./guess_the_languageProgramming Languages
Programming Languages · easy · #568

Which programming language is this?

let pair: [string, number] = ["age", 30];
let tags: string[] = [];
tags.push(pair[0]);
console.log(tags.length);

Answer: TypeScript

Type annotations such as the tuple type [string, number] and string[] after a colon are TypeScript, not plain JavaScript.
Play Programming Languages ▸