Question: What is output of below code ? let count=0; (function() { if (count === 0) { let count = 1; } console.log(count); console.log(count); })();


What is output of below code ? let count=0; (function() { if 

What is output of below code ? let count=0; (function() { if (count === 0) { let count = 1; } console.log(count); console.log(count); })();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

In this code snippet there are two occurrences of the variable count One is declared out... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!