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)
倚天杖
相关分类