What will be the output of the below-given TypeScript code?

var num1:number=5; 
function ab():void{ 
var num1:number=3; 
console.log(num1); 
} 
console.log(num1); 
ab(); 
console.log(num1);

5 3 5

5 3 3

3 3 3

5 5 5

Correct Option - d

To get all Infosys Certified TypeScript Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in