Predict the output of the following code. 

Line 1: let tempCounter = 0; 
Line 2: function getStatusData() { 
Line 3: var tempCounter = 10; 
Line 4: tempCounter++ 
Line 5: console.log(tempCounter >= 10 ? 'Active' : 'Inactive'); 
Line 6: } 
Line 7: console.log(tempCounter >= 10 ? 'Active' : 'Inactive'); 
Line 8: getStatusData();

Error in Line 7

Active 

Inactive

Inactive

Active

Error in Line 5
Verified Answer
Correct Option - c

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

Telegram

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

Updated on Tue, 1 Jul 2025