Why default arguments are immutable inside of a function in javascript?

后端 未结 0 357
慢半拍i
慢半拍i 2021-01-28 23:49

Why , in javascript, the default arguments cannot be changed inside of a function and the non-default ones can?

function func(a) {
  a = 99; // updating a also up         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题