I have the following code to access global variable a from the nested function dd. but i am only able to access a from abc. How can we access a=6 from dd function.
var a = 6;
function abc() {
var a = 10;
a += 1
console.log(a)
function dd() {
a += 1
console.log(a)
}
dd()
}
abc();