const d = 4let a = 1if (true) {let a = 4var b = 2if (a < 5)="">var c = 1b = 5}}console.log(a + b + c)
What is is the output and why?
a)The output is 7 because a, b, c and d are globally scoped variables
b)The output is 11 because a, b, and c are all globally scoped variables while d is a block scoped variable
c)The output is 7 because b and c are globally scoped variables
d)The output is 6 because a is a block scoped variable and b is a globally scoped variable
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here