function a(){
function b(){
alert("hi");
}
return b();
}
function c(){
var d = a();
}
c();
When I execute the above, I get the alert "hi". but if I do as below
function a(){
function b(){
alert("hi");
}
return b();
}
function c(){
var d = a();
d();
}
c();
I am expecting to see two alerts for assignment and function call statements in c();, but i get only one alert. What am I doing wrong?
TypeError: undefined is not a function-dis not a function