阅读背景:

同名函数,同名变量和函数的问题_m0_37820751的博客

来源:互联网 

 1、同名函数会覆盖,所以输出2


<script type="text/javascript">
 function t(){
      console.log(1);
  }
 function t(){
     console.log(2);
 }
 t(); //输出2
</script>
<script type="text/javascri



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: