function fn1(){
  var a = 6;
  function fn2(){
    alert(a) ;
  }
  return fn2;
}
// var f = fn1();
// f()  alert 6
fn1() //
as in the above code, the variable f can be assigned to alert 6, but there is no response when calling fn1 directly. What is the principle of this, please?
