I am trying to grasp the concept of closure function in javascript. Below is a simple code.Need to pass an argument of "inside" to the innerFunction. how do i do it.
function outerFunction(outerVariable){
function innerFunction(innerVariable){
console.log("Outer Variable" +" = "+ outerVariable);
console.log("Inner Variable" +" = "+ innerVariable);
}
return innerFunction;
};
const newOutFunction = outerFunction("outside");
newOutFunction();