Closures are features in JavaScript where a function can “remember” its variables lexical Scope
(the scope in which it was created) even after the outer function has finished executing. This allows the inner function to access variables from its enclosing scope even if the outer function is no longer active.
Closure example
function outerFunction(outerVariable){
return function innerFunction(innerVariable){
console.log(`outer variable : ${outerVariable}`);
console.log(`inner variable : ${innerVariable}`);
};}
const closureFunction = outerFunction('outside');
closureFunction('inside');