你在打电话
fun()
从内部
fun()
。这是递归,并导致无限循环。
对于下一次,请将代码和错误发布为三个反引号(``)包围的文本,而不是图像。
以下是正确的代码:
function fun(z) {
console.log(`we have a argument named z`)
console.log(`print by call the argumentName: ${z}`)
console.log(`print by call the argument.length: ${arguments.length}`)
console.log(`print by call the this.length: ${this.length}`)
console.log(`print by call the functionName.length: ${fun.length}`)
// This line is calling `fun()` from inside `fun()`, causing an infinite loop.
// console.log(`print by call the functionName().length: ${fun().length}`)
}
let a = 5
fun(a);