js中调用函数中的变量

(function f1() {
  var num = 10;
    window.num = num;
})(); console.log(num);

 

posted @ 2021-06-05 16:03  胸怀丶若谷  阅读(315)  评论(0编辑  收藏  举报