SOURCE

var scope1 = "global scope";
function checkscope() {
  var scope1 = "local scope";
  function f1() {
    return scope1;
  }
  console.log(f1);
  return f1;
}
console.log(checkscope()());
console 命令行工具 X clear

                    
>
console