Typed superset of JavaScript. Play TypeScript trivia solo to sharpen your knowledge, or challenge a friend head-to-head in Trivia Tango — every question comes with an explanation so you learn as you play. Questions span every level, from easy warm-ups to expert-level stumpers, so there's a real challenge here however much you already know.
A mix of easy, medium and hard — questions run from warm-up to expert, so there's a real challenge at every level. Think you know the answers? Play to find out.
This keyword declares a variable that cannot be reassigned after its initial value is set.
Difficulty: EasyThis access modifier makes class members visible only within the class itself.
Difficulty: MediumThis TypeScript technique uses an intersection with an empty object to force type inference.
Difficulty: HardThis primitive type represents textual data enclosed in quotes.
Difficulty: EasyThis keyword allows a class to inherit properties and methods from another class.
Difficulty: MediumThis TypeScript pattern creates a builder that enforces required method calls through changing return types.
Difficulty: HardThis symbol is used after a variable name to indicate it should have a specific type.
Difficulty: EasyThis operator returns the type of a value as a string at runtime.
Difficulty: Medium