Chinaunix

标题: 既然有函数提升,那么outer的定义在inner之前,为什么没有错误? [打印本页]

作者: cdsfiui    时间: 2016-08-07 11:17
标题: 既然有函数提升,那么outer的定义在inner之前,为什么没有错误?

  1. function outer() {
  2.     inner();
  3. }

  4. function inner() {
  5.     console.log(arguments.callee.caller);
  6. }
  7. outer();
复制代码
//既然有函数提升,那么outer的定义在inner之前,为什么没有错误?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2