What is the reason for the compiler throwing errors in the following TypeScript code snippet? 

function calculateArea(length:number, breadth:number) { 
return length * breadth; 
} 

Assume that you provide “abc” and 5 as the input to the function calculateArea.

No error in the code.

Type Annotation Error.

Function return type has to be mentioned.

None of the options are correct.

Verified Answer
Correct Option - b

To get all Infosys Certified TypeScript Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram