function a(x=y,y){console.log(x)} a(undefined,1)
对于函数传参有相互关系的表达式该如何理解?
function a(x = y, y) {
console.log(x); // y is not defined
}
function b(x, y = x){
console.log(y); // 1
}
a(undefined, 1)
b(1, undefined)
鸿蒙传说
倚天杖
随时随地看视频慕课网APP
相关分类