All quizzesEasy
TypeScript Fundamentals
Preview — 3 of 10 questions
What best describes TypeScript?
AA new programming language completely unrelated to JavaScript
BA JavaScript framework like React or Angular
CA statically typed superset of JavaScript that compiles to JavaScript
DA JavaScript runtime environment like Node.js
Which line would TypeScript flag as a type error?
javascript
let name: string = "Alice";
let age: number = 30;
let isActive: boolean = true;Aname = "Bob"
Bname = 42
Cage = 31
DisActive = false
Which declaration correctly types an array of strings in TypeScript?
Alet words: [string] = ["hello", "world"]
Blet words: string[] = ["hello", "world"]
Clet words: string = ["hello", "world"]
Dlet words: Array = ["hello", "world"]
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.