Question from the Typescript - Overview test

What is the result of compiling the following TypeScript code?

Easy

What is the result of compiling the following TypeScript code?

interface Animal {
  name: string;
}

interface Dog extends Animal {
  breed: string;
}

const myDog: Dog = {
  name: 'Buddy',
  breed: 'Labrador',
};

function printName(animal: Animal): void {
  console.log(animal.name);
}

printName(myDog);
Author: Vincent CotroStatus: PublishedQuestion passed 799 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!