function outer() {
const outerVar = "Hi i am outerVar";
function inner() {
const innerVar = "Hi i am innerVar";
console.log(outerVar);
console.log(innerVar);
}
return inner;
}
const innerFn = outer();
innerFn();
// Hi i am outerVar
// Hi i am innerVar