In this function, am expecting the return value to be increment of variable value . However , i am getting original value ,
here is my function:
var num = function(){
var a = 0;
return a++;
}
alert(num()); //it giving the result as 0 instead of 1...why?
can anyone please explain this to me?