ES6:参数默认值

函数的参数默认值设置javascript function f(a){ a = a || '默认值' console.log(a) } ES6java function f(a='默认值'){ console.log(a) }
相关文章
相关标签/搜索