You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(z); // 20, even though it's declared inside the if block
In modern JavaScript, it's recommended to use let and const for variable declarations because they provide block scope and help prevent some of the issues associated with var