const d = 4 let a = 1 if (true) { let a = 4 var b = 2 if (a


const d = 4
let a = 1
if (true) {

let a = 4
var b = 2
if (a < 5)="">
var c = 1
b = 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



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here