How It WorksPricing🔥Interactive Engineering Learning🤩 Free Career AdviceAboutContact
Log In
Add to Slack

TypeScript Magic Quiz

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

Given the following code:

interface Bird {
  fly(): void;
  layEggs(): void;

interface Fish {
  swim(): void;
  layEggs(): void;

declare function getSmallPet(): Fish | Bird;
let pet = getSmallPet();

Which of the following is valid code?

  • pet.layEggs()
  • pet.swim()
How do you stack up?
My Progress
Percentage of Total Answers Correct
0 / 0

Breakdown by Tag
0 / 0
0 / 0
Not sure about the answer? Check out:
TypeScript BasicsLast updated today
View Learning

How It Works