function x() {
var a = 2;
y();
}
function y() {
a += 3;
}
x();
//returns a is not defined
If i declare a function (y) outside the function (x) where it's been called, why it isn't inherit the outer function's variables and values? There's a way to solve the problem described above?