javascript
let fn = (a) => { var a = a || 1; }
var a = a || 1; 改用let写,麻烦一点的写法我会,我想知道有什么高雅的技巧。
let a = a || 1; 会提示: Block scoped variables cannot share name with 'var' variables or parameters in the same block scope
江户川乱折腾
九州编程
相关分类