We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在声明函数的时候,可以在参数尾部添加逗号了。
function foo( param1, param2, ) {}
同理,调用函数时也可以这样用:
foo( 'abc', 'def', );
在一个对象中使用会被忽略:
let obj = { first: 'Jane', last: 'Doe', }; for(o in obj){ console.log(o) }
'first' 'last'
同样,在数组中使用也会被忽略:
let arr = [ 'red', 'green', 'blue', ]; console.log(arr.length);
3
使用函数尾部参数语法有两个好处:
foo( 'abc', ); 改成: foo( 'abc', 'def', );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
现在声明函数的时候,可以在参数尾部添加逗号了。
同理,调用函数时也可以这样用:
在一个对象中使用会被忽略:
同样,在数组中使用也会被忽略:
使用函数尾部参数语法有两个好处:
The text was updated successfully, but these errors were encountered: