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.fly()
  • pet.layEggs()
  • pet.swim()
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
View Learning
SkillMagic

How It Works