TypeScript Magic Quiz

Test your knowledge of TypeScript by answering this quiz!
Question about TypeScript Basics

Given the following code:

interface Player {
  first: string;
  last: string;
  team: string;
  points?: string;
}

let player: Player = {};

Which of the following is an invalid type for the variable player?


  • { first: "Johnny", last: "Appleseed", team: "Red", points: 5 }
  • { first: "Johnny", last: "Appleseed", team: "Red" }
  • { first: "Johnny", last: "Appleseed", team: "Red", points: "5" }
  • { first: "Johnny", last: "Appleseed", team: "Red", points: undefined }
How do you stack up?
My Progress
Percentage of Total Answers Correct
0 / 0
0%

Breakdown by Tag
web-frontend
0 / 0
0%
0 / 0
0%
Not sure about the answer? Check out:
TypeScript BasicsLast updated today