【问题标题】:Why not program gives an error. As two parameters were required I have pass only one parameter and it still work为什么不程序给出错误。由于需要两个参数,我只传递了一个参数,它仍然有效
【发布时间】:2022-07-06 13:21:47
【问题描述】:

enter image description here 我在这里粘贴的图像。因为我只传递了一个参数作为参数,因为需要两个参数,所以为什么这个函数可以工作,为什么不给我们一个错误

【问题讨论】:

    标签: javascript function


    【解决方案1】:

    您返回 23,该函数没有同时使用 a 和 b,因此不会因为不同时使用两者而产生错误。

    【讨论】:

      猜你喜欢
      • 2021-06-29
      • 1970-01-01
      • 1970-01-01
      • 2021-07-23
      • 2011-03-14
      • 1970-01-01
      • 1970-01-01
      • 2019-06-27
      • 2012-09-26
      相关资源
      最近更新 更多