What is the meaning of returning a function from another function in javascript. Is this is same as if I call a function which is in another function
function fun(c){
let a=3;
return function(){
return a+c;
}
}
let add=fun(2);
console.log(add);
. And my second question is why this add variable is a function.